---
title: "init(calibratedRGBWhitePoint:blackPoint:gamma:matrix:)"
framework: coregraphics
role: symbol
role_heading: Initializer
path: "coregraphics/cgcolorspace/init(calibratedrgbwhitepoint:blackpoint:gamma:matrix:)"
---

# init(calibratedRGBWhitePoint:blackPoint:gamma:matrix:)

Creates a calibrated RGB color space.

## Declaration

```swift
init?(calibratedRGBWhitePoint whitePoint: UnsafePointer<CGFloat>, blackPoint: UnsafePointer<CGFloat>?, gamma: UnsafePointer<CGFloat>?, matrix: UnsafePointer<CGFloat>?)
```

## Parameters

- `whitePoint`: An array of 3 numbers specifying the tristimulus value, in the CIE 1931 XYZ-space, of the diffuse white point.
- `blackPoint`: An array of 3 numbers specifying the tristimulus value, in CIE 1931 XYZ-space, of the diffuse black point.
- `gamma`: An array of 3 numbers specifying the gamma for the red, green, and blue components of the color space.
- `matrix`: An array of 9 numbers specifying the linear interpretation of the gamma-modified RGB values of the color space with respect to the final XYZ representation.

## Return Value

Return Value A new calibrated RGB color space, or NULL if unsuccessful. In Objective-C, you’re responsible for releasing this object by calling CGColorSpaceRelease.

## Discussion

Discussion Creates a device-independent RGB color space that represents colors relative to a reference white point. This white point is based on the whitest light that can be generated by the output device. Colors in a device-independent color space should appear the same when displayed on different devices, to the extent that the capabilities of the device allow. For color spaces that require a detailed gamma, such as the piecewise transfer function used in sRGB or ITU-R BT.709, you may want to use the function  init(iccBasedNComponents:range:profile:alternate:) instead, because it can accurately represent these gamma curves.

## See Also

### Creating Color Spaces

- [init(calibratedGrayWhitePoint:blackPoint:gamma:)](coregraphics/cgcolorspace/init(calibratedgraywhitepoint:blackpoint:gamma:).md)
- [init(iccBasedNComponents:range:profile:alternate:)](coregraphics/cgcolorspace/init(iccbasedncomponents:range:profile:alternate:).md)
- [init(indexedBaseSpace:last:colorTable:)](coregraphics/cgcolorspace/init(indexedbasespace:last:colortable:).md)
- [init(labWhitePoint:blackPoint:range:)](coregraphics/cgcolorspace/init(labwhitepoint:blackpoint:range:).md)
- [init(patternBaseSpace:)](coregraphics/cgcolorspace/init(patternbasespace:).md)
- [init(name:)](coregraphics/cgcolorspace/init(name:).md)
- [init(platformColorSpaceRef:)](coregraphics/cgcolorspace/init(platformcolorspaceref:).md)
- [init(iccData:)](coregraphics/cgcolorspace/init(iccdata:).md)
- [init(propertyListPlist:)](coregraphics/cgcolorspace/init(propertylistplist:).md)
- [CGColorSpaceCreateDeviceRGB()](coregraphics/cgcolorspacecreatedevicergb().md)
- [CGColorSpaceCreateDeviceCMYK()](coregraphics/cgcolorspacecreatedevicecmyk().md)
- [CGColorSpaceCreateDeviceGray()](coregraphics/cgcolorspacecreatedevicegray().md)
- [init(iccProfileData:)](coregraphics/cgcolorspace/init(iccprofiledata:).md)
