Color.hpp
Go to the documentation of this file.
313 const etk::Color<MY_TYPE,MY_TYPE_SIZE>& operator+= (const etk::Color<MY_TYPE,MY_TYPE_SIZE>& _obj) {
333 etk::Color<MY_TYPE,MY_TYPE_SIZE> operator+ (const etk::Color<MY_TYPE,MY_TYPE_SIZE>& _obj) const {
383 etk::Color<MY_TYPE,MY_TYPE_SIZE> operator* (const etk::Color<MY_TYPE,MY_TYPE_SIZE>& _obj) const {
450 template<typename MY_TYPE, int MY_TYPE_SIZE> uint32_t Color<MY_TYPE, MY_TYPE_SIZE>::get() const {
455 template<typename MY_TYPE, int MY_TYPE_SIZE> Color<MY_TYPE, MY_TYPE_SIZE>::Color(const std::string& _input) {
464 Color<uint8_t, 4> value = etk::parseStringStartWithRGBGen(std::string(_input, 4, _input.size()-5));
467 Color<uint8_t, 4> value = etk::parseStringStartWithRGBGen(std::string(_input, 5, _input.size()-6));
470 Color<double, 4> value = etk::parseStringStartWithRGB(std::string(_input, 11, _input.size()-12));
473 Color<double, 4> value = etk::parseStringStartWithRGB(std::string(_input, 12, _input.size()-13));
476 Color<double, 4> value = etk::parseStringStartWithRGB(std::string(_input, 12, _input.size()-13));
479 Color<double, 4> value = etk::parseStringStartWithRGB(std::string(_input, 13, _input.size()-14));
482 Color<uint32_t, 4> value = etk::parseStringStartWithRGBUnsigned32(std::string(_input, 9, _input.size()-10));
485 Color<uint32_t, 4> value = etk::parseStringStartWithRGBUnsigned32(std::string(_input, 10, _input.size()-11));
488 Color<uint16_t, 4> value = etk::parseStringStartWithRGBUnsigned16(std::string(_input, 9, _input.size()-10));
491 Color<uint16_t, 4> value = etk::parseStringStartWithRGBUnsigned16(std::string(_input, 10, _input.size()-11));
494 Color<uint8_t, 4> value = etk::parseStringStartWithRGBUnsigned8(std::string(_input, 8, _input.size()-9));
497 Color<uint8_t, 4> value = etk::parseStringStartWithRGBUnsigned8(std::string(_input, 9, _input.size()-10));
508 template<int MY_TYPE_SIZE> std::ostream& operator <<(std::ostream& _os, const Color<uint8_t, MY_TYPE_SIZE>& _obj) { // RGB & RGBA 8 bits
541 template<int MY_TYPE_SIZE> std::ostream& operator <<(std::ostream& _os, const Color<uint16_t, MY_TYPE_SIZE>& _obj) { // RGB & RGBA 8 bits
567 template<int MY_TYPE_SIZE> std::ostream& operator <<(std::ostream& _os, const Color<uint32_t, MY_TYPE_SIZE>& _obj) { // RGB & RGBA 8 bits
593 template<int MY_TYPE_SIZE> std::ostream& operator <<(std::ostream& _os, const Color<float, MY_TYPE_SIZE>& _obj) { // RGB float & RGBA float
621 template<int MY_TYPE_SIZE> std::ostream& operator <<(std::ostream& _os, const Color<double, MY_TYPE_SIZE>& _obj) { // RGB & RGBA 8 bits
649 template<typename MY_TYPE, int MY_TYPE_SIZE> std::ostream& operator <<(std::ostream& _os, const std::vector<Color<MY_TYPE, MY_TYPE_SIZE> >& _obj) {
const Color mediumSlateBlue
const Color darkGoldenRod
const Color powderBlue
const Color darkBlue
const Color darkSeaGreen
const Color pink
const Color rosyBrown
const Color khaki
const Color navajoWhite
const Color navy
uint32_t get() const
Get the Generic uint32_t value of the color.
Definition: Color.hpp:450
const Color plum
const Color paleGreen
const etk::Color< MY_TYPE, MY_TYPE_SIZE > & operator+=(const etk::Color< MY_TYPE, MY_TYPE_SIZE > &_obj)
Operator+= Addition an other etk::color with this one.
Definition: Color.hpp:313
const Color lightGray
const Color slateBlue
const Color indianRed
const Color moccasin
const Color tomato
const Color lightCyan
const Color oliveDrab
const Color ghostWhite
const Color goldenRod
const Color darkGreen
etk::Color< MY_TYPE, MY_TYPE_SIZE > operator*(const etk::Color< MY_TYPE, MY_TYPE_SIZE > &_obj) const
Operator*= Multiply 2 color together.
Definition: Color.hpp:383
const Color darkKhaki
const Color sienna
basic namespace of the etk library. (it might contain all the etk fuctions/class/structures without m...
Definition: Archive.hpp:16
const Color darkGray
const Color cornflowerBlue
const Color lightSkyBlue
etk::Color< MY_TYPE, MY_TYPE_SIZE > operator+(const etk::Color< MY_TYPE, MY_TYPE_SIZE > &_obj) const
Operator+ Addition an other etk::color with this one.
Definition: Color.hpp:333
const Color gray
const Color gold
const Color lime
const Color mediumBlue
const Color violet
const Color crimson
const Color cadetBlue
const Color teal
const Color yellowGreen
const Color mistyRose
const Color purple
const Color mediumOrchid
const Color lightGreen
const Color lightSlateGray
const Color midnightBlue
const Color tan
Color()
Constructor. It does not initialise element of class.
Definition: Color.hpp:42
const Color limeGreen
const Color linen
const Color whiteSmoke
etk::Color< uint32_t, 4 > parseStringStartWithRGBUnsigned32(const std::string &_input)
Get a color value started with a "rgb()" converted in uint32.
const Color aquamarine
const Color mediumPurple
const Color steelBlue
const Color blue
const Color indigo
const Color wheat
const Color silver
const Color dimGray
std::string getString() const
Convert the color in an generic string value ("#FEDCBA98")
Definition: Color.hpp:223
const Color royalBlue
const Color magenta
const Color lightSeaGreen
const Color dodgerBlue
const Color chartreuse
const Color darkGrey
const Color lightGoldenRodYellow
etk::Color< uint16_t, 4 > parseStringStartWithRGBUnsigned16(const std::string &_input)
Get a color value started with a "rgb()" converted in uint16.
const Color lawnGreen
const Color forestGreen
const Color orangeRed
const Color chocolate
const Color salmon
const Color lemonChiffon
const Color darkCyan
const Color fireBrick
const Color azure
const Color deepPink
const Color blueViolet
const Color lavender
const Color mediumSeaGreen
const Color lightYellow
const Color darkTurquoise
const Color papayaWhip
const Color darkViolet
const Color darkMagenta
const Color lightSalmon
const Color grey
const Color paleTurquoise
const Color aqua
const Color springGreen
const Color lightSlateGrey
const Color darkRed
const Color peachPuff
const Color greenYellow
bool operator!=(const etk::Color< MY_TYPE, MY_TYPE_SIZE > &_obj) const
Different comparaison operator.
Definition: Color.hpp:105
etk::Color< double, 4 > parseStringStartWithRGB(const std::string &_input)
Get a color value started with a "rgb()" keep in double.
const Color hotPink
const Color lightCoral
const Color darkSalmon
Color< MY_TYPE, MY_TYPE_SIZE > & operator=(const etk::Color< MY_TYPE, MY_TYPE_SIZE > &_input)
Asignemement operator.
Definition: Color.hpp:93
const Color black
const Color antiqueWhite
const Color aliceBlue
const Color darkorange
const Color cyan
static const MY_TYPE defaultAlpha
Default alpha value.
Definition: Color.hpp:35
const Color olive
static const Color< MY_TYPE, MY_TYPE_SIZE > emptyColor
To auto fill with no data in all case.
Definition: Color.hpp:34
const Color maroon
etk::Color< uint8_t, 4 > parseStringStartWithRGBUnsigned8(const std::string &_input)
Get a color value started with a "rgb()" converted in uint6.
const Color green
const Color mediumTurquoise
const Color slateGrey
const Color coral
const Color peru
const Color mintCream
const Color lightPink
bool operator==(const etk::Color< MY_TYPE, MY_TYPE_SIZE > &_obj) const
Equality comparaison operator.
Definition: Color.hpp:119
const Color seaGreen
const Color darkSlateBlue
const Color deepSkyBlue
const Color turquoise
const Color red
const Color darkOrchid
const Color darkOliveGreen
const Color thistle
const Color paleVioletRed
const Color burlyWood
const Color yellow
const Color ivory
const Color lightBlue
const Color oldLace
const Color white
const Color beige
const Color honeyDew
const Color fuchsia
Color(MY_TYPE _r, MY_TYPE _g, MY_TYPE _b)
Contructor with request initialisation.
Definition: Color.hpp:59
The color class is a template to abstract the color implementation choice.
Definition: Color.hpp:32
const Color floralWhite
const Color darkSlateGray
etk::Color< uint8_t, 4 > parseStringStartWithRGBGen(const std::string &_input)
Get a color value started with a "rgb()" converted in uint8.
const Color slateGray
const Color cornsilk
const Color seaShell
Color(MY_TYPE _r, MY_TYPE _g)
Contructor with request initialisation.
Definition: Color.hpp:67
const Color bisque
const Color lightGrey
const Color brown
etk::Color< MY_TYPE, MY_TYPE_SIZE > & operator*=(const etk::Color< MY_TYPE, MY_TYPE_SIZE > &_obj)
Operator*= Multiply 2 color together.
Definition: Color.hpp:343
const Color lavenderBlush
etk::Color< uint8_t, 4 > parseStringStartWithSharp(const std::string &_input)
Get a color value started with a "#".
const Color sandyBrown
etk::Color< uint8_t, 4 > parseStringColorNamed(const std::string &_input)
Get a color value started with a "named" converted in uint8 like red, geen ...
const Color mediumAquaMarine
const Color mediumVioletRed
const Color snow
std::string getHexString() const
Convert the color in an hexedecimal string ("0xFEDCBA98")
Definition: Color.hpp:214
const Color darkSlateGrey
const Color orchid
Color(MY_TYPE _r, MY_TYPE _g, MY_TYPE _b, MY_TYPE _a)
Contructor with request initialisation.
Definition: Color.hpp:50
const Color lightSteelBlue
const Color paleGoldenRod
const Color orange
const Color mediumSpringGreen
const Color gainsboro
const Color blanchedAlmond
const Color skyBlue
const Color dimGrey
const Color saddleBrown