Color creation
Load colors from asset catalogs, and create colors from raw component values, such as those used by grayscale, RGB, HSB, and CMYK colors.
Topics
Loading color objects from asset catalogs
Creating a color using RGB components
init(srgbRed:green:blue:alpha:)init(displayP3Red:green:blue:alpha:)init(red:green:blue:alpha:)init(calibratedRed:green:blue:alpha:)init(deviceRed:green:blue:alpha:)
Creating a color using HSB components
init(calibratedHue:saturation:brightness:alpha:)init(deviceHue:saturation:brightness:alpha:)init(hue:saturation:brightness:alpha:)init(colorSpace:hue:saturation:brightness:alpha:)
Creating a color using CMYK components
Creating a color using white components
init(white:alpha:)init(calibratedWhite:alpha:)init(deviceWhite:alpha:)init(genericGamma22White:alpha:)