Contents

Color creation

Load colors from asset catalogs and create colors from raw component values.

Overview

Create color objects when you want to use specific colors in your UI, altering the raw component values used by grayscale, RGB, HSB, and CMYK. You can set the specified opacity and RGB component values to create personalized colors that fit your needs. Create colors dynamically by component values changing based on the currently active traits. You can use pattern colors to set the fill or stroke color.

Topics

Creating a color from component values

Creating a color dynamically

Creating a color from another color object

Creating a pattern-based color

Creating a color from a resource

See Also

Getting existing colors