Creates a device-independent color space that is defined according to the ICC color profile specification.
- iOS 2.0+
- macOS 10.0+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
- Core Graphics
The number of color components in the color space defined by the ICC profile data. This must match the number of components actually in the ICC profile and must equal 1, 3, or 4.
An array of numbers that specify the minimum and maximum valid values of the corresponding color components. The size of the array is two times the number of components. If
kthe color component, the valid range is range
[2*k] ≤ c[k] ≤range
A data provider that supplies the ICC profile.
An alternate color space to use in case the ICC profile is not supported. The alternate color space must have
ncolor components. You must supply an alternate color space. If this parameter is
NULL, then the function returns
A new ICC-based color space object. You are responsible for releasing this object by calling
CGColor. If unsuccessful, returns
This function creates an ICC-based color space from an ICC color profile, as defined by the International Color Consortium. ICC profiles define the reproducible color gamut (the range of colors supported by a device) and other characteristics of a particular output device, providing a way to accurately transform the color space of one device to the color space of another. The ICC profile is usually provided by the manufacturer of the device. Additionally, some color monitors and printers contain electronically embedded ICC profile information, as do some bitmap formats such as TIFF. 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.
You may want to use this function for a color space that requires a detailed gamma, such as the piecewise transfer function used in sRGB or ITU-R BT.709, because this function can accurately represent these gamma curves.