---
title: "element::color"
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/element/color
---

# element::color

Returns the current color of the element.

## Declaration

```swift
half4 element::color()
```

## Return Value

Return Value The color as a 4-component vector (red, green, blue, alpha)

## Discussion

Discussion Use this function to read the element’s RGBA color values, including both the color channels and opacity. note:
