Returns a version of the color object that is compatible with the specified color type.
- macOS 10.13+
The type of color object that you want. For example, if you want a color object containing RGB components, specify
.Color Type .component Based
A compatible color object, or
nil if a compatible color object is not available.
Before accessing the details of an
NSColor object, use this method to ensure that you have an object capable of returning those details. For example, before you access the component values, make sure you have a color object of type
NSColor. For some types of colors, conversions to a compatible color type may be possible.