Crate waterui_color

Crate waterui_color 

Source
Expand description

§Color Module

This module provides types for working with colors in different color spaces. It supports sRGB, Display P3, and OKLCH color spaces, with utilities for conversion and manipulation of color values.

The OKLCH color space is perceptually uniform and is therefore recommended for most user interface work. By expressing colors in OKLCH you can adjust lightness, chroma, and hue independently while maintaining predictable contrast relationships across themes.

The primary type is Color, which can represent colors in sRGB, Display P3, or OKLCH color spaces, with conversion methods from various tuple formats.

Structs§

Amber
Amber color.
Blue
Blue color.
BlueGrey
Blue grey color.
Brown
Brown color.
Color
A color value that can be resolved in different color spaces.
Cyan
Cyan color.
DeepOrange
Deep orange color.
DeepPurple
Deep purple color.
Green
Green color.
Grey
Grey color.
Indigo
Indigo color.
LightBlue
Light blue color.
LightGreen
Light green color.
Lime
Lime color.
Oklch
Represents a color in the perceptually-uniform OKLCH color space.
Orange
Orange color.
P3
Represents a color in the Display P3 color space.
Pink
Pink color.
Purple
Purple color.
Red
Red color.
ResolvedColor
Represents a resolved color in linear sRGB color space with extended range support.
Srgb
Represents a color in the sRGB color space.
Teal
Teal color.
WithOpacity
Represents a color with an opacity/alpha value applied.
Yellow
Yellow color.

Enums§

Colorspace
Represents the supported color spaces for color representation.
HexColorError
Errors that can occur when parsing hexadecimal color strings.