---
title: "init(red:green:blue:alpha:)"
framework: coreimage
role: symbol
role_heading: Initializer
path: "coreimage/cicolor/init(red:green:blue:alpha:)"
---

# init(red:green:blue:alpha:)

Initialize a Core Image color object in the sRGB color space with the specified red, green, blue, and alpha component values.

## Declaration

```swift
convenience init(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat)
```

## Parameters

- `red`: The color’s unpremultiplied red component value between 0 and 1.
- `green`: The color’s unpremultiplied green component value between 0 and 1.
- `blue`: The color’s unpremultiplied blue component value between 0 and 1.
- `alpha`: The color’s alpha (opacity) value between 0 and 1.

## Return Value

Return Value  An initialized CIColor instance.

## Discussion

Discussion On macOS before 10.10, the CIColor’s color space will be Generic RGB.

## See Also

### Initializing Color Objects

- [init(cgColor:)](coreimage/cicolor/init(cgcolor:)-1hzk4.md)
- [init(color:)](coreimage/cicolor/init(color:).md)
