|
| constexpr color_t | ghassanpl::premultiplied (color_t const &color) |
| | Returns the color multiplied by its own alpha.
|
| constexpr color_t | ghassanpl::with_alpha (color_t const &color, float a) |
| constexpr color_t | ghassanpl::saturated (color_t const &color) |
| | Returns a color with all elements clamped between 0 and 1.
|
| constexpr color_t | ghassanpl::lighten (color_t const &color, float coef) |
| | Returns a color lightened by a coefficient.
|
| constexpr color_t | ghassanpl::contrast (color_t const &color, float contrast) |
| | Returns a color with its contrast changed.
|
| constexpr color_t | ghassanpl::contrast2 (color_t const &color, float contrast) |
| | Returns a color with its contrast changed This uses a differen algorithm and contrast value than contrast.
|
| constexpr color_t | ghassanpl::gamma_correct (color_t const &color, const float gamma) |
| | Returns a gamma corrected color.
|
| constexpr color_t | ghassanpl::inverted (color_t const &color) |
| | Returns an inverted color, i.e. with (1.0-x) on all of its elements, excluding its alpha.
|
| constexpr color_t | ghassanpl::contrasting (color_t const &color) |
| | Returns a color that's a good contrasting color for the original.
|
| constexpr float | ghassanpl::luminance (color_t const &color) |
| | Get brightness of color.
|
| constexpr color_t | ghassanpl::desaturated (color_t const &color, float desaturation) |
| | Returns a color sapped of desaturation percent (0-1) of its saturation.
|
| constexpr color_t | ghassanpl::from_u32_rgb (uint32_t rgb) |
| | Gets a color from an RGB 8bpp integer, with R being most significant.
|
| constexpr color_t | ghassanpl::from_u32_bgr (uint32_t rgb) |
| | Gets a color from an BGR 8bpp integer, with R being least significant.
|
| constexpr color_t | ghassanpl::from_u32_rgba (uint32_t rgb) |
| | Gets a color from an RGBA 8bpp integer, with R being most significant.
|
| constexpr color_t | ghassanpl::from_u32_bgra (uint32_t rgb) |
| | Gets a color from an BGRA 8bpp integer, with A being least significant, and B being most significant.
|
| constexpr color_t | ghassanpl::from_u32_argb (uint32_t rgb) |
| | Gets a color from an ARGB 8bpp integer, with A being most significant, and B being least significant.
|
| constexpr color_t | ghassanpl::from_u32_abgr (uint32_t rgb) |
| | Gets a color from an ABGR 8bpp integer, with A being most significant, and R being least significant.
|
| constexpr color_t | ghassanpl::from_u8_rgb (uint8_t r, uint8_t g, uint8_t b) |
| constexpr color_t | ghassanpl::from_u8_rgba (uint8_t r, uint8_t g, uint8_t b, uint8_t a) |
| constexpr uint32_t | ghassanpl::to_u32_argb (color_t const &rgba) |
| | Creates an 8bpp ARGB integer from a color.
|
| constexpr uint32_t | ghassanpl::to_u32_abgr (color_t const &rgba) |
| | Creates an 8bpp ABGR integer from a color.
|
| constexpr uint32_t | ghassanpl::to_u32_rgba (color_t const &rgba) |
| | Creates an 8bpp RGBA integer from a color.
|
| constexpr uint32_t | ghassanpl::to_u32_bgra (color_t const &rgba) |
| | Creates an 8bpp BGRA integer from a color.
|
| constexpr uint32_t | ghassanpl::to_u32_rgb (color_t const &rgba) |
| | Creates a 32 bitbpp RGB integer from a color, with the most significant 8 bits set to 0.
|
| constexpr uint32_t | ghassanpl::to_u32_bgr (color_t const &rgba) |
| | Creates a 32 bitbpp BGR integer from a color, with the most significant 8 bits set to 0.
|
| template<std::same_as< color_rgba_u32_t > TO> |
| constexpr TO | ghassanpl::named_cast (color_rgba_t const &from) |
| template<typename TO, typename FROM> |
| constexpr TO | ghassanpl::color_cast (FROM const &from) |
| constexpr glm::tvec4< uint8_t > | ghassanpl::to_u8 (color_t const &rgba) |
| | Returns the color as a glm::vec4 of uint8_ts.
|
| constexpr color_t | ghassanpl::to_rgb (color_hsva_t const &hsva) |
| | Converts a HSVA color to RGBA space.
|
| constexpr color_hsva_t | ghassanpl::to_hsv (color_t const &rgba) |
| | Converts an RGBA color to HSVA space.
|
| constexpr color_rgba_t | ghassanpl::from_html (const char *str, size_t n) |
| | Converts a HTML color string (like #FBA or fafafa) to an RGBA color.
|
| consteval color_rgba_t | ghassanpl::operator""_rgb (const char *str, size_t n) |
| | Converts a HTML color string (like #FBA or fafafa) to an RGBA color.
|
| constexpr color_rgba_t | ghassanpl::from_html (std::string_view html) |
| | Converts a HTML color string (like #FBA or fafafa) to an RGBA color.
|