color_stop_t

Added in version 7.0.0.

class color_stop_t(*args, **kwargs)

Information about a color stop on a color line.

Color lines typically have offsets ranging between 0 and 1, but that is not required.

Note: despite color being unpremultiplied here, interpolation in gradients shall happen in premultiplied space. See the OpenType spec COLR section for details.

Fields

class color_stop_t
color

The color, unpremultiplied

is_foreground

Whether the color is the foreground

offset

The offset of the color stop