---
title: components
framework: coregraphics
role: symbol
role_heading: Instance Property
path: coregraphics/cgcolor/components
---

# components

Returns the values of the color components (including alpha) associated with a color.

## Declaration

```swift
var components: [CGFloat]? { get }
```

## Discussion

Discussion An array of intensity values for the color components (including alpha) associated with the specified color. The size of the array is equal to the color’s numberOfComponents value.

## See Also

### Examining a Color

- [alpha](coregraphics/cgcolor/alpha.md)
- [colorSpace](coregraphics/cgcolor/colorspace.md)
- [numberOfComponents](coregraphics/cgcolor/numberofcomponents.md)
- [pattern](coregraphics/cgcolor/pattern.md)
