<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIColor/init(red:green:blue:alpha:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIColor(im)initWithRed:green:blue:alpha:"
  },
  "title" : "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.

```
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


An initialized [`CIColor`](/documentation/CoreImage/CIColor) instance.

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)