Expand description
Color types and operations.
Port of agg_color_rgba.h, agg_color_rgba.cpp, and agg_color_gray.h.
Provides RGBA and grayscale color types at different precisions:
Rgba— f64 components (linear working space)Rgba8— u8 components (8-bit per channel)Rgba16— u16 components (16-bit per channel)Gray8— u8 grayscale + alphaGray16— u16 grayscale + alpha
Note: sRGB colorspace variants (srgba8, sgray8) from the C++ code are
not included in Phase 1. They will be added when needed (they require sRGB
lookup table infrastructure).
Structs§
- Gray8
- Grayscale color with u8 components (value + alpha).
Port of C++
gray8T<linear>. - Gray16
- Grayscale color with u16 components (value + alpha).
Port of C++
gray16. - Order
Abgr - ABGR component order: A=0, B=1, G=2, R=3
- Order
Argb - ARGB component order: A=0, R=1, G=2, B=3
- Order
Bgr - BGR component order: B=0, G=1, R=2
- Order
Bgra - BGRA component order: B=0, G=1, R=2, A=3
- Order
Rgb - RGB component order: R=0, G=1, B=2
- Order
Rgba - RGBA component order: R=0, G=1, B=2, A=3
- Rgba
- RGBA color with f64 components in range [0, 1].
Port of C++
rgba. - Rgba8
- RGBA color with u8 components.
Port of C++
rgba8T<linear>(linear colorspace variant). - Rgba16
- RGBA color with u16 components.
Port of C++
rgba16.
Functions§
- argb8_
packed - Create an Rgba8 from a packed ARGB value (0xAARRGGBB).
- bgr8_
packed - Create an Rgba8 from a packed BGR value (0xBBGGRR).
- rgb8_
packed - Create an Rgba8 from a packed RGB value (0xRRGGBB).
- rgba_
pre - Create a pre-multiplied Rgba color.