<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIColor/initWithRed:green:blue:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIColor(im)initWithRed:green:blue:"
  },
  "title" : "initWithRed:green:blue:"
}
-->

# initWithRed:green:blue:

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

```
- (instancetype) initWithRed:(CGFloat) red green:(CGFloat) green blue:(CGFloat) blue;
```

## 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.

## 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)