Crate zng_color

Source
Expand description

Color and gradient types, functions and macros, Rgba, filter, hex! and more.

§Crate

This crate is part of the zng project.

Modules§

colors
Named primary, secondary and tertiary colors.
filter
Color filter effect.
gradient
Gradient types.
web_colors
Named web colors.

Macros§

hex
Hexadecimal color literal.
stops
Creates a GradientStops containing the arguments.

Structs§

Hsla
HSL + alpha.
Hsva
HSV + alpha
LightDark
Represents a dark and light color.
PreMulRgba
Pre-multiplied RGB + alpha.
Rgba
RGB + alpha.
RgbaComponent
Color functions argument conversion helper.

Enums§

ColorScheme
Color scheme preference.
LerpSpace
Defines the color space for color interpolation.
MixBlendMode
Color mix blend mode.

Statics§

COLOR_SCHEME_VAR
Defines the preferred color scheme in a context.

Traits§

LightDarkVarExt
Extension methods for impl Var<LightDark>.
MixAdjust
Color mix and adjustment methods.

Functions§

hsl
HSL color, opaque, alpha is set to 1.0.
hsla
HSLA color.
hsla_linear_sampler
Animation sampler that sets the lerp_space to LerpSpace::HslaLinear.
hsla_sampler
Animation sampler that sets the lerp_space to LerpSpace::Hsla.
hsv
HSV color, opaque, alpha is set to 1.0.
hsva
HSVA color.
lerp_rgba
Default implementation of lerp for Rgba in apps.
lerp_space
Gets the lerp space used for color interpolation.
light_dark
RGBA color pair.
rgb
RGB color, opaque, alpha is set to 1.0.
rgba
RGBA color.
rgba_sampler
Animation sampler that sets the lerp_space to LerpSpace::Rgba.
with_lerp_space
Calls f with lerp_space set to space.

Type Aliases§

RenderMixBlendMode
Webrender MixBlendMode.