|
NSUNI/NSLAR Library a250670
|
Provides functions for color conversion and manipulation. More...
Functions | |
| u8 | nnl::utl::color::Convert4To8 (u8 v) noexcept |
| Converts a 4-bit color channel value to an 8-bit color channel value. | |
| u8 | nnl::utl::color::Convert5To8 (u8 v) noexcept |
| Converts a 5-bit color channel value to an 8-bit color channel value. | |
| u8 | nnl::utl::color::Convert6To8 (u8 v) noexcept |
| Converts a 6-bit color channel value to an 8-bit color channel value. | |
| u32 | nnl::utl::color::RGBA4444ToRGBA8888 (u16 src) noexcept |
| Converts RGBA4444 color format to RGBA8888 color format. | |
| u32 | nnl::utl::color::RGBA5551ToRGBA8888 (u16 src) noexcept |
| Converts RGBA5551 color format to RGBA8888 color format. | |
| u32 | nnl::utl::color::RGB565ToRGBA8888 (u16 src) noexcept |
| Converts RGB565 color format to RGBA8888 color format. | |
| u16 | nnl::utl::color::RGBA8888ToRGB565 (u32 value) noexcept |
| Converts RGBA8888 color format to RGB565 color format. | |
| u16 | nnl::utl::color::RGBA8888ToRGBA5551 (u32 value) noexcept |
| Converts RGBA8888 color format to RGBA5551 color format. | |
| u16 | nnl::utl::color::RGBA8888ToRGBA4444 (u32 value) noexcept |
| Converts RGBA8888 color format to RGBA4444 color format. | |
| std::string | nnl::utl::color::IntToHex (u32 color, bool alpha=true) |
| Converts an integer color value to a hex string representation. | |
| u32 | nnl::utl::color::HexToInt (std::string hex) |
| Converts a hex string representation of a color to an integer color value. | |
| glm::vec4 | nnl::utl::color::IntToFloat (u32 color) noexcept |
| Converts an integer color value to a floating-point vector representation. | |
| u8 | nnl::utl::color::FloatToInt (float color) noexcept |
| Converts a floating-point color value to an integer color representation. | |
| u32 | nnl::utl::color::FloatToInt (glm::vec3 color) noexcept |
| Converts a vec3 floating-point color vector to an integer color representation. | |
| u32 | nnl::utl::color::FloatToInt (glm::vec4 color) |
| Converts a vec4 floating-point color vector to an integer color representation. | |
| float | nnl::utl::color::SRGBToLinear (float c) noexcept |
| Converts an sRGB color value to a linear color value. | |
| template<typename T> | |
| T | nnl::utl::color::SRGBToLinear (T color) |
| Converts a vec of sRGB color values to linear color values. | |
| float | nnl::utl::color::LinearToSRGB (float c) noexcept |
| Converts a linear color value to an sRGB color value. | |
| template<typename T> | |
| T | nnl::utl::color::LinearToSRGB (T color) |
| Converts a vector of linear color values to sRGB color values. | |
Provides functions for color conversion and manipulation.
Converts a 4-bit color channel value to an 8-bit color channel value.
| v | The 4-bit color channel value. |
Converts a 5-bit color channel value to an 8-bit color channel value.
| v | The 5-bit color channel value. |
Converts a 6-bit color channel value to an 8-bit color channel value.
| v | The 6-bit color channel value. |
|
inlinenoexcept |
Converts a floating-point color value to an integer color representation.
| color | The floating-point value representing a color component (0.0 to 1.0). |
|
inlinenoexcept |
Converts a vec3 floating-point color vector to an integer color representation.
| color | The vec3 color vector where components are in the range [0.0, 1.0]. |
|
inline |
Converts a vec4 floating-point color vector to an integer color representation.
| color | The vec4 color vector where components are in the range [0.0, 1.0]. |
|
inline |
Converts a hex string representation of a color to an integer color value.
| hex | The hex string representing the color (format: "#RRGGBBAA"). |
|
inlinenoexcept |
Converts an integer color value to a floating-point vector representation.
| color | The 32-bit integer representing RGBA color. |
|
inline |
Converts an integer color value to a hex string representation.
| color | The 32-bit integer representing RGBA color. |
| alpha | Boolean flag to include alpha in hex representation. |
|
inlinenoexcept |
Converts a linear color value to an sRGB color value.
| c | The linear color component. |
| T nnl::utl::color::LinearToSRGB | ( | T | color | ) |
Converts a vector of linear color values to sRGB color values.
| T | Type of the color container (e.g., glm::vec3). |
| color | The color container with linear components. |
Converts RGB565 color format to RGBA8888 color format.
| src | The source color in RGB565 format. |
Converts RGBA4444 color format to RGBA8888 color format.
| src | The source color in RGBA4444 format. |
Converts RGBA5551 color format to RGBA8888 color format.
| src | The source color in RGBA5551 format. |
Converts RGBA8888 color format to RGB565 color format.
| value | The source color in RGBA8888 format. |
Converts RGBA8888 color format to RGBA4444 color format.
| value | The source color in RGBA8888 format. |
Converts RGBA8888 color format to RGBA5551 color format.
| value | The source color in RGBA8888 format. |
|
inlinenoexcept |
Converts an sRGB color value to a linear color value.
| c | The sRGB color component. |
| T nnl::utl::color::SRGBToLinear | ( | T | color | ) |
Converts a vec of sRGB color values to linear color values.
| T | Type of the color container (e.g., glm::vec3). |
| color | The color container with sRGB components. |