6 #include <glm/common.hpp> 23 uint8_t r = 0, g = 0, b = 0;
25 Color3b(uint8_t red, uint8_t green, uint8_t blue);
34 const uint8_t *GetPtr()
const;
41 uint8_t r = 0, g = 0, b = 0, a = 255;
43 Color4b(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha);
52 const uint8_t *GetPtr()
const;
59 float r = 0.0f, g = 0.0f, b = 0.0f;
61 Color3f(
float red,
float green,
float blue);
68 const float *GetPtr()
const;
71 Color3f &operator*=(
float multiplier);
78 float r = 0.0f, g = 0.0f, b = 0.0f, a = 1.0f;
80 Color4f(
float red,
float green,
float blue,
float alpha);
88 const float *GetPtr()
const;
91 Color4f &operator*=(
float multiplier);
100 Color3hex &operator=(
const char *hex_color);
108 const char *GetPtr()
const;
111 char hex[7] =
"000000";
119 Color4hex &operator=(
const char *hex_color);
127 const char *GetPtr()
const;
129 char hex[9] =
"000000FF";
146 COGS_API
Color3f operator* (
const float factor,
const Color3f &col);
147 COGS_API
Color3f operator* (
const Color3f &col,
const float factor);
148 COGS_API
Color4f operator* (
const float factor,
const Color4f &col);
149 COGS_API
Color4f operator* (
const Color4f &col,
const float factor);
184 COGS_API std::vector<cogs::Color3f>
MapValuesToColors(
const std::vector<float> &values, std::function<
float(
float)> process_func,
ColorMap mapping_func);
Namespace of "Computer Graphic Structures" library, which implement many core classes and structures...
Definition: AabbHierarchy.h:8
Holds three color channels in float format in range 0-1.
Definition: Color.h:57
const Color3f EMERALD
blueish green
Definition: Color.h:230
const Color3f STX_VANILLA
Skeletex bright yellow.
Definition: Color.h:252
const Color3f GREEN
pure green - 0 255 0
Definition: Color.h:217
const Color3f NAVY
dark blue
Definition: Color.h:236
COGS_API std::string ColorMapToString(ColorMap map)
Returns string representation of ColorMap enum value.
const Color3f STX_GREEN
Skeletex darker green.
Definition: Color.h:248
Holds three color channels in uint8 format in range 0-255.
Definition: Color.h:21
const Color3f MAGENTA
pinkish red
Definition: Color.h:239
const Color3f GRAY60
60% lightness
Definition: Color.h:202
const Color3f BLUE
pure blue - 0 0 255
Definition: Color.h:219
const Color3f CYAN
greenish blue
Definition: Color.h:232
const Color3f FOREST
darker green
Definition: Color.h:226
Holds four color channels in float format in range 0-1.
Definition: Color.h:76
const Color3f LIME
bright green
Definition: Color.h:228
ColorMap
Color mapping options.
Definition: Color.h:154
Holds three color channels in hexadecimal string representation.
Definition: Color.h:96
Holds four color channels in hexadecimal string representation.
Definition: Color.h:115
blue > cyan > green > yellow > red > purple
const Color3f GRAY80
80% lightness
Definition: Color.h:198
const Color3f SKY
nicer pure blue
Definition: Color.h:234
const Color3f STX_NAVY
Skeletex dark blue.
Definition: Color.h:246
const Color3f STX_LIME
Skeletex light green.
Definition: Color.h:250
const Color3f GRAY20
20% lightness
Definition: Color.h:210
Holds four color channels in uint8 format in range 0-255.
Definition: Color.h:39
const Color3f CRIMSON
nicer pure red
Definition: Color.h:222
const Color3f GRAY70
70% lightness
Definition: Color.h:200
COGS_API std::vector< cogs::Color3f > MapValuesToColors(const std::vector< float > &values, ColorMap mapping_func)
Converts float values in range <0.0, 1.0> to colors, depending on selected mapping function...
const Color3f GRAY50
50% lightness
Definition: Color.h:204
const Color3f GRAY40
40% lightness
Definition: Color.h:206
const Color3f RED
pure red - 255 0 0
Definition: Color.h:215
const Color3f STX_ORANGE
Skeletex orange.
Definition: Color.h:254
const Color3f GRAY30
30% lightness
Definition: Color.h:208
COGS_API cogs::Color3f MapValueToColor(float value, ColorMap mapping_func)
Converts float value in range <0.0, 1.0> to color, depending on selected mapping function.
bluish tones > green > redish tones
const Color3f GRAY10
10% lightness - darkest of grays
Definition: Color.h:212
const Color3f GRAY90
90% lightness -lightest of grays
Definition: Color.h:196