Module color

Module color 

Source
Expand description

Color support functions.

Modules§

color_function 🔒
Output of parsing a color function, e.g. rgb(..), hsl(..), color(..)
component
Parse/serialize and resolve a single color component.
convert
cbindgen:ignore Color conversion algorithms.
mix
Color mixing/interpolation.
parsing
Parsing for CSS colors.
to_css 🔒
Write colors into CSS strings.

Macros§

color_components_as 🔒
Given an AbsoluteColor, return the 4 float components as the type given, e.g.:

Structs§

AbsoluteColor
An absolutely specified color, using either rgb(), rgba(), lab(), lch(), oklab(), oklch() or color().
ColorComponents
The 3 components that make up a color. (Does not include the alpha component)
ColorFlags
Flags used when serializing colors.
ComponentDetails
Holds details about each component passed into creating a new AbsoluteColor.

Enums§

ColorFunction
Represents a specified color function.
ColorSpace
A color space representation in the CSS specification.

Constants§

PRE_ALLOCATED_COLOR_MIX_ITEMS
Number of color-mix items to reserve on the stack to avoid heap allocations.

Type Aliases§

ColorMixItemList
Conveniece type to use for collecting color mix items.