---
title: "module::setColor"
framework: Compute Graph
role: symbol
role_heading: Function
platforms: [iOS 27.0+, iPadOS 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: computegraph/module/setcolor
---

# module::setColor

Sets the color of an element to the specified RGBA value.

## Declaration

```swift
void module::setColor(half4 color)
```

## Parameters

- `color`: The new color as a 4-component vector (red, green, blue, alpha)

## Discussion

Discussion Use this function to change the visual appearance of an element by assigning a new color with alpha channel. note:
