SourceModule ecolor
Color conversions and types.
This crate is built for the wants and needs of egui.
If you want an actual good color crate, use color instead.
If you want a compact color representation, use Color32.
If you want to manipulate RGBA colors in linear space use Rgba.
If you want to manipulate colors in a way closer to how humans think about colors, use HsvaGamma.
Conventions§
The word "gamma" or "srgb" is used to refer to values in the non-linear space defined by
the sRGB transfer function.
We use int for anything in the "gamma" space.
We use float in 0-1 range for anything in the linear space.
Feature flags§
Classes§
| Color32 | This format is used for space-efficient color representation (32 bits). |
| HexColor Enum | A wrapper around Color32 that converts to and from a hex-color string |
| Hsva | Hue, saturation, value, alpha. All in the range [0, 1]. No premultiplied alpha. |
| HsvaGamma | Like Hsva but with the |
| ParseHexColorError Enum | |
| Rgba | 0-1 linear space |