HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends
v1::color Class Reference

#include <hikogui/color/color.hpp>

Public Member Functions

constexpr color (color const &) noexcept=default
 
constexpr color (color &&) noexcept=default
 
constexpr coloroperator= (color const &) noexcept=default
 
constexpr coloroperator= (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
 
constexpr float16r () noexcept
 
constexpr float16g () noexcept
 
constexpr float16b () noexcept
 
constexpr float16a () noexcept
 
constexpr float16 const & r () const noexcept
 
constexpr float16 const & g () const noexcept
 
constexpr float16 const & b () const noexcept
 
constexpr float16 const & a () const noexcept
 
constexpr bool holds_invariant () const noexcept
 

Static Public Member Functions

static constexpr color transparent () noexcept
 
static constexpr color white () noexcept
 
static constexpr color black () noexcept
 

Friends

constexpr friend bool operator== (color const &lhs, color const &rhs) noexcept=default
 
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
 

Detailed Description

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 tsRGBA color space. This color space is compatible with the sRGB standard IEC 61966-2-1:1999.

tsRGB details:

tsRGBA details:

This color format is inspired by scRGB, however scRGB only describes a 12- or 16-bit integer per component encoding of RGB values between -0.5 and 7.5.


The documentation for this class was generated from the following file: