Function

CGColorSpaceCreateDeviceGray

Creates a device-dependent grayscale color space.

Declaration

CGColorSpaceRef CGColorSpaceCreateDeviceGray(void);

Return Value

A device-dependent gray color space. You are responsible for releasing this object by calling CGColorSpaceRelease. If unsuccessful, returns NULL.

Discussion

Colors in a device-dependent color space are not transformed or otherwise modified when displayed on an output device—that is, there is no attempt to maintain the visual appearance of a color. As a consequence, colors in a device color space often appear different when displayed on different output devices. For this reason, device color spaces are not recommended when color preservation is important.

See Also

Creating Generic or Device-Dependent Color Spaces

CGColorSpaceCreateDeviceCMYK

Creates a device-dependent CMYK color space.

CGColorSpaceCreateDeviceRGB

Creates a device-dependent RGB color space.

CGColorSpaceCreateWithPlatformColorSpace

Creates a platform-specific color space.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software