IDS peak ICV v1.2.0
Loading...
Searching...
No Matches
Color Class Reference

#include <peak_icv/painting/peak_icv_color.hpp>

Public Member Functions

constexpr Color ()=default
 Constructs a default Color initialized to black.
 
constexpr Color (uint64_t colorCodeRaw)
 Constructs a Color from a raw 64-bit color code containing RGB values.
 
constexpr Color (uint16_t red, uint16_t green, uint16_t blue)
 Constructs a Color from separate red, green, and blue values.
 
constexpr Color (ColorConstant colorCode)
 Constructs a Color from a predefined ColorConstant.
 
constexpr uint16_t GetRed () const
 
constexpr uint16_t GetGreen () const
 
constexpr uint16_t GetBlue () const
 
constexpr std::tuple< red_t, green_t, blue_t > GetRGB () const
 
constexpr uint64_t GetRaw () const
 
constexpr bool operator== (const Color &rhs) const
 
constexpr bool operator!= (const Color &rhs) const
 
constexpr bool operator== (const ColorConstant &rhs) const
 
constexpr bool operator!= (const ColorConstant &rhs) const
 

Detailed Description

Holds a color code composed of red, green, and blue components.

Since
ids_peak_icv 1.1

Definition at line 146 of file peak_icv_color.hpp.

Constructor & Destructor Documentation

◆ Color() [1/4]

Color ( )
constexprdefault

Constructs a default Color initialized to black.

Since
ids_peak_icv 1.1

◆ Color() [2/4]

Color ( uint64_t colorCodeRaw)
inlineexplicitconstexpr

Constructs a Color from a raw 64-bit color code containing RGB values.

The raw code uses the following layout:

  • red in bits 32 to 47,
  • green in bits 16 to 31,
  • blue in bits 0 to 15.
Parameters
colorCodeRawRaw color code encoding red, green, and blue components.
Since
ids_peak_icv 1.1

Definition at line 168 of file peak_icv_color.hpp.

◆ Color() [3/4]

Color ( uint16_t red,
uint16_t green,
uint16_t blue )
inlineconstexpr

Constructs a Color from separate red, green, and blue values.

Parameters
redRed component value.
greenGreen component value.
blueBlue component value.
Since
ids_peak_icv 1.1

Definition at line 181 of file peak_icv_color.hpp.

◆ Color() [4/4]

Color ( ColorConstant colorCode)
inlineexplicitconstexpr

Constructs a Color from a predefined ColorConstant.

Parameters
colorCodePredefined color constant.
Since
ids_peak_icv 1.1

Definition at line 192 of file peak_icv_color.hpp.

Member Function Documentation

◆ GetBlue()

uint16_t GetBlue ( ) const
inlineconstexpr
Returns
The blue component value of the color.
Since
ids_peak_icv 1.1

Definition at line 221 of file peak_icv_color.hpp.

◆ GetGreen()

uint16_t GetGreen ( ) const
inlineconstexpr
Returns
The green component value of the color.
Since
ids_peak_icv 1.1

Definition at line 211 of file peak_icv_color.hpp.

◆ GetRaw()

uint64_t GetRaw ( ) const
inlineconstexpr
Returns
The raw 64-bit color code representing the color.
Since
ids_peak_icv 1.1

Definition at line 241 of file peak_icv_color.hpp.

◆ GetRed()

uint16_t GetRed ( ) const
inlineconstexpr
Returns
The red component value of the color.
Since
ids_peak_icv 1.1

Definition at line 201 of file peak_icv_color.hpp.

◆ GetRGB()

std::tuple< red_t, green_t, blue_t > GetRGB ( ) const
inlineconstexpr
Returns
A tuple containing the red, green, and blue components.
Since
ids_peak_icv 1.1

Definition at line 231 of file peak_icv_color.hpp.

◆ operator!=() [1/2]

bool operator!= ( const Color & rhs) const
inlineconstexpr
Since
ids_peak_icv 1.1

Definition at line 261 of file peak_icv_color.hpp.

◆ operator!=() [2/2]

bool operator!= ( const ColorConstant & rhs) const
inlineconstexpr
Since
ids_peak_icv 1.1

Definition at line 281 of file peak_icv_color.hpp.

◆ operator==() [1/2]

bool operator== ( const Color & rhs) const
inlineconstexpr
Since
ids_peak_icv 1.1

Definition at line 251 of file peak_icv_color.hpp.

◆ operator==() [2/2]

bool operator== ( const ColorConstant & rhs) const
inlineconstexpr
Since
ids_peak_icv 1.1

Definition at line 271 of file peak_icv_color.hpp.