Skip to main content

Crate color_utils

Crate color_utils 

Source
Expand description

Color utilities.

Re-exports§

pub use rgb;
pub use self::constants::*;
pub use self::color::*;

Modules§

color
Color primitives
constants
Color constants

Structs§

Rgb
A Red + Green + Blue pixel.
Rgba
A Red + Green + Blue + Alpha pixel.

Traits§

Glsl
IntoArray
Normalize
Quantize
WithAlphaOpaque

Functions§

hue_deg
Return hue in [0, 360). Returns None if color is monochrome (grayscale).
hue_luminance_custom
Given a hue in [0, 360) and luminance [0, 100], return the RGB value.
hue_to_rgb
Give a fully saturated RGB value for the given hue
luminance_custom
Returns luminance value from 0.0-100.0 with custom chroma bias.
normalize_rgb
Convert RGB8 to values in [0.0, 1.0]
normalize_rgba
Convert RGBA8 to values in [0.0, 1.0]
quantize_rgb
Convert normalized to values to RGB8
quantize_rgba
Convert normalized to values to RGBA8
report_sizes

Type Aliases§

RGB8
8-bit RGB
RGBA8
8-bit RGBA, alpha is last. 0 = transparent, 255 = opaque.