|
HikoGUI
A low latency retained GUI
|
#include <hikogui/color/color.hpp>
Public Member Functions | |
| constexpr | color (color const &) noexcept=default |
| constexpr | color (color &&) noexcept=default |
| constexpr color & | operator= (color const &) noexcept=default |
| constexpr color & | operator= (color &&) noexcept=default |
| constexpr | color (f16x4 const &other) noexcept |
| constexpr | color (f32x4 const &other) noexcept |
| constexpr | operator f16x4 () const noexcept |
| constexpr | operator f32x4 () const noexcept |
| constexpr | color (float r, float g, float b, float a=1.0f) noexcept |
| size_t | hash () const noexcept |
| constexpr float16 & | r () noexcept |
| constexpr float16 & | g () noexcept |
| constexpr float16 & | b () noexcept |
| constexpr float16 & | a () noexcept |
| constexpr float16 | r () const noexcept |
| constexpr float16 | g () const noexcept |
| constexpr float16 | b () const noexcept |
| constexpr float16 | a () const noexcept |
| constexpr bool | holds_invariant () const noexcept |
Static Public Member Functions | |
| static std::vector< std::string > | list () noexcept |
| List color names. | |
| static color * | find (std::string const &name) noexcept |
| Find a color by name. | |
| static color | black () noexcept |
| static color | silver () noexcept |
| static color | gray () noexcept |
| static color | white () noexcept |
| static color | maroon () noexcept |
| static color | red () noexcept |
| static color | purple () noexcept |
| static color | fuchsia () noexcept |
| static color | green () noexcept |
| static color | lime () noexcept |
| static color | olive () noexcept |
| static color | yellow () noexcept |
| static color | navy () noexcept |
| static color | blue () noexcept |
| static color | teal () noexcept |
| static color | aqua () noexcept |
| static color | indigo () noexcept |
| static color | orange () noexcept |
| static color | pink () noexcept |
| static color | background () noexcept |
| static color | gray1 () noexcept |
| static color | gray2 () noexcept |
| static color | gray3 () noexcept |
| static color | gray4 () noexcept |
| static color | gray5 () noexcept |
| static color | gray6 () noexcept |
| static color | gray7 () noexcept |
| static color | gray8 () noexcept |
| static color | gray9 () noexcept |
| static color | foreground () noexcept |
| static color | transparent () noexcept |
| static color | accent () noexcept |
Friends | |
| constexpr friend bool | operator== (color const &lhs, color const &rhs) noexcept |
| constexpr friend color | operator* (color const &lhs, color const &rhs) noexcept |
| constexpr friend color | composit (color const &lhs, color const &rhs) noexcept |
| constexpr friend color | desaturate (color const &rhs) noexcept |
| constexpr friend color | operator* (matrix3 const &lhs, color const &rhs) noexcept |
| Transform a color by a color matrix. | |
| constexpr friend color | operator* (identity3 const &lhs, color const &rhs) noexcept |
| std::ostream & | operator<< (std::ostream &lhs, color const &rhs) |
This is a RGBA floating point color.
The color can be converted between different color spaces using the matrix-class.
But in most cases in the application and hikogui library this color would be in the scRGBA color space. This color space is compatible with the sRGB standard IEC 61966-2-1:1999.
scRGB details:
scRGBA details:
|
inlinestaticnoexcept |
Find a color by name.
| name | The name of the color to find. |
|
inlinestaticnoexcept |
List color names.
Transform a color by a color matrix.
The alpha value is not included in the transformation and copied from the input.
| lhs | The 3x3 color transformation matrix to use. |
| rhs | The color to be transformed. |