ClanLib  2.3.7
List of all members
CL_Colorf Class Reference

Floating point color description class (for float). More...

#include <color.h>

Public Member Functions

Construction
 CL_Colorf ()
 Constructs a color. More...
 
 CL_Colorf (float r, float g, float b, float a=1.0f)
 Constructs a color. More...
 
 CL_Colorf (const float *array_rgba)
 Constructs a color. More...
 
 CL_Colorf (unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
 Constructs a color. More...
 
 CL_Colorf (int r, int g, int b, int a=255)
 Constructs a color. More...
 
 CL_Colorf (const CL_Color &color)
 
 CL_Colorf (const CL_StringRef &hexstr)
 Constructs a color. More...
 
Operations
void normalize ()
 Normalize the color by ensuring that all color values lie inbetween (0.0, 1.0) More...
 
void set_alpha (float value)
 Set alpha color component, in the range 0-1. More...
 
void set_red (float value)
 Set red color component, in the range 0-1. More...
 
void set_green (float value)
 Set green color component, in the range 0-1. More...
 
void set_blue (float value)
 Set blue color component, in the range 0-1. More...
 
bool operator== (const CL_Colorf &c) const
 Color == Color operator (deep compare) More...
 
bool operator!= (const CL_Colorf &c) const
 Color != Color operator (deep compare) More...
 
 operator CL_Color () const
 Type conversion operator. More...
 

Static Public Attributes

Statics
static CL_Colorf aliceblue
 
static CL_Colorf antiquewhite
 
static CL_Colorf aqua
 
static CL_Colorf aquamarine
 
static CL_Colorf azure
 
static CL_Colorf beige
 
static CL_Colorf bisque
 
static CL_Colorf black
 
static CL_Colorf blanchedalmond
 
static CL_Colorf blue
 
static CL_Colorf blueviolet
 
static CL_Colorf brown
 
static CL_Colorf burlywood
 
static CL_Colorf cadetblue
 
static CL_Colorf chartreuse
 
static CL_Colorf chocolate
 
static CL_Colorf coral
 
static CL_Colorf cornflowerblue
 
static CL_Colorf cornsilk
 
static CL_Colorf crimson
 
static CL_Colorf cyan
 
static CL_Colorf darkblue
 
static CL_Colorf darkcyan
 
static CL_Colorf darkgoldenrod
 
static CL_Colorf darkgray
 
static CL_Colorf darkgreen
 
static CL_Colorf darkgrey
 
static CL_Colorf darkkhaki
 
static CL_Colorf darkmagenta
 
static CL_Colorf darkolivegreen
 
static CL_Colorf darkorange
 
static CL_Colorf darkorchid
 
static CL_Colorf darkred
 
static CL_Colorf darksalmon
 
static CL_Colorf darkseagreen
 
static CL_Colorf darkslateblue
 
static CL_Colorf darkslategray
 
static CL_Colorf darkslategrey
 
static CL_Colorf darkturquoise
 
static CL_Colorf darkviolet
 
static CL_Colorf deeppink
 
static CL_Colorf deepskyblue
 
static CL_Colorf dimgray
 
static CL_Colorf dimgrey
 
static CL_Colorf dodgerblue
 
static CL_Colorf firebrick
 
static CL_Colorf floralwhite
 
static CL_Colorf forestgreen
 
static CL_Colorf fuchsia
 
static CL_Colorf gainsboro
 
static CL_Colorf ghostwhite
 
static CL_Colorf gold
 
static CL_Colorf goldenrod
 
static CL_Colorf gray
 
static CL_Colorf grey
 
static CL_Colorf green
 
static CL_Colorf greenyellow
 
static CL_Colorf honeydew
 
static CL_Colorf hotpink
 
static CL_Colorf indianred
 
static CL_Colorf indigo
 
static CL_Colorf ivory
 
static CL_Colorf khaki
 
static CL_Colorf lavender
 
static CL_Colorf lavenderblush
 
static CL_Colorf lawngreen
 
static CL_Colorf lemonchiffon
 
static CL_Colorf lightblue
 
static CL_Colorf lightcoral
 
static CL_Colorf lightcyan
 
static CL_Colorf lightgoldenrodyellow
 
static CL_Colorf lightgray
 
static CL_Colorf lightgreen
 
static CL_Colorf lightgrey
 
static CL_Colorf lightpink
 
static CL_Colorf lightsalmon
 
static CL_Colorf lightseagreen
 
static CL_Colorf lightskyblue
 
static CL_Colorf lightslategray
 
static CL_Colorf lightslategrey
 
static CL_Colorf lightsteelblue
 
static CL_Colorf lightyellow
 
static CL_Colorf lime
 
static CL_Colorf limegreen
 
static CL_Colorf linen
 
static CL_Colorf magenta
 
static CL_Colorf maroon
 
static CL_Colorf mediumaquamarine
 
static CL_Colorf mediumblue
 
static CL_Colorf mediumorchid
 
static CL_Colorf mediumpurple
 
static CL_Colorf mediumseagreen
 
static CL_Colorf mediumslateblue
 
static CL_Colorf mediumspringgreen
 
static CL_Colorf mediumturquoise
 
static CL_Colorf mediumvioletred
 
static CL_Colorf midnightblue
 
static CL_Colorf mintcream
 
static CL_Colorf mistyrose
 
static CL_Colorf moccasin
 
static CL_Colorf navajowhite
 
static CL_Colorf navy
 
static CL_Colorf oldlace
 
static CL_Colorf olive
 
static CL_Colorf olivedrab
 
static CL_Colorf orange
 
static CL_Colorf orangered
 
static CL_Colorf orchid
 
static CL_Colorf palegoldenrod
 
static CL_Colorf palegreen
 
static CL_Colorf paleturquoise
 
static CL_Colorf palevioletred
 
static CL_Colorf papayawhip
 
static CL_Colorf peachpuff
 
static CL_Colorf peru
 
static CL_Colorf pink
 
static CL_Colorf plum
 
static CL_Colorf powderblue
 
static CL_Colorf purple
 
static CL_Colorf red
 
static CL_Colorf rosybrown
 
static CL_Colorf royalblue
 
static CL_Colorf saddlebrown
 
static CL_Colorf salmon
 
static CL_Colorf sandybrown
 
static CL_Colorf seagreen
 
static CL_Colorf seashell
 
static CL_Colorf sienna
 
static CL_Colorf silver
 
static CL_Colorf skyblue
 
static CL_Colorf slateblue
 
static CL_Colorf slategray
 
static CL_Colorf slategrey
 
static CL_Colorf snow
 
static CL_Colorf springgreen
 
static CL_Colorf steelblue
 
static CL_Colorf tan
 
static CL_Colorf teal
 
static CL_Colorf thistle
 
static CL_Colorf tomato
 
static CL_Colorf turquoise
 
static CL_Colorf violet
 
static CL_Colorf wheat
 
static CL_Colorf white
 
static CL_Colorf whitesmoke
 
static CL_Colorf yellow
 
static CL_Colorf yellowgreen
 
static CL_Colorf transparent
 rgba(0, 0, 0, 0). More...
 
static CL_Colorf gray10
 
static CL_Colorf gray20
 
static CL_Colorf gray30
 
static CL_Colorf gray40
 
static CL_Colorf gray50
 
static CL_Colorf gray60
 
static CL_Colorf gray70
 
static CL_Colorf gray80
 
static CL_Colorf gray90
 

Attributes

float r
 
float g
 
float b
 
float a
 
float get_red () const
 Get Red. More...
 
float get_green () const
 Get Green. More...
 
float get_blue () const
 Get Blue. More...
 
float get_alpha () const
 Get Alpha. More...
 

Detailed Description

Floating point color description class (for float).

Constructor & Destructor Documentation

CL_Colorf::CL_Colorf ( )
inline

Constructs a color.

Referenced by CL_Colorf().

CL_Colorf::CL_Colorf ( float  r,
float  g,
float  b,
float  a = 1.0f 
)
inline

Constructs a color.

Color components are specified in the range 0 to 1.
An alpha value of 0 means complete transparency, while 1 means completely opaque (solid).

Parameters
r= Red color component.
g= Green color component.
b= Blue color component.
a= Alpha (transparency) color component.
CL_Colorf::CL_Colorf ( const float *  array_rgba)
inline

Constructs a color.

Color components are specified in the range 0 to 1.
An alpha value of 0 means complete transparency, while 1 means completely opaque (solid).

Parameters
array_rgba= Red,Green,Blue,Alpha color component.
CL_Colorf::CL_Colorf ( unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a = 255 
)
inline

Constructs a color.

Color components are specified in the range 0 to 255.
An alpha value of 0 means complete transparency, while 255 means completely opaque (solid).

Parameters
r= Red color component.
g= Green color component.
b= Blue color component.
a= Alpha (transparency) color component.
CL_Colorf::CL_Colorf ( int  r,
int  g,
int  b,
int  a = 255 
)
inline

Constructs a color.

Color components are specified in the range 0 to 255.
An alpha value of 0 means complete transparency, while 255 means completely opaque (solid).

Parameters
r= Red color component.
g= Green color component.
b= Blue color component.
a= Alpha (transparency) color component.
CL_Colorf::CL_Colorf ( const CL_Color color)
inlineexplicit
CL_Colorf::CL_Colorf ( const CL_StringRef hexstr)
inline

Constructs a color.

Color components are specified in the range 0 to 255.
An alpha value of 0 means complete transparency, while 255 means completely opaque (solid).

Parameters
hexstrThe colors rgba components as a hexadecimal string of the format "#rrggbbaa", where the '#' and "aa" parts are optional.

References CL_Colorf(), and CL_Color::find_color().

Member Function Documentation

float CL_Colorf::get_alpha ( ) const
inline

Get Alpha.

Returns
alpha

References a.

float CL_Colorf::get_blue ( ) const
inline

Get Blue.

Returns
blue

References b.

float CL_Colorf::get_green ( ) const
inline

Get Green.

Returns
green

References g.

float CL_Colorf::get_red ( ) const
inline

Get Red.

Returns
red

References r.

void CL_Colorf::normalize ( )
inline

Normalize the color by ensuring that all color values lie inbetween (0.0, 1.0)

References a, b, g, and r.

CL_Colorf::operator CL_Color ( ) const
inline

Type conversion operator.

bool CL_Colorf::operator!= ( const CL_Colorf c) const
inline

Color != Color operator (deep compare)

References a, b, g, and r.

bool CL_Colorf::operator== ( const CL_Colorf c) const
inline

Color == Color operator (deep compare)

References a, b, g, and r.

void CL_Colorf::set_alpha ( float  value)
inline

Set alpha color component, in the range 0-1.

References a.

void CL_Colorf::set_blue ( float  value)
inline

Set blue color component, in the range 0-1.

References b.

void CL_Colorf::set_green ( float  value)
inline

Set green color component, in the range 0-1.

References g.

void CL_Colorf::set_red ( float  value)
inline

Set red color component, in the range 0-1.

References r.

Member Data Documentation

float CL_Colorf::a
CL_Colorf CL_Colorf::aliceblue
static

rgb(240, 248, 255).

CL_Colorf CL_Colorf::antiquewhite
static

rgb(250, 235, 215).

CL_Colorf CL_Colorf::aqua
static

rgb( 0, 255, 255).

CL_Colorf CL_Colorf::aquamarine
static

rgb(127, 255, 212).

CL_Colorf CL_Colorf::azure
static

rgb(240, 255, 255).

float CL_Colorf::b
CL_Colorf CL_Colorf::beige
static

rgb(245, 245, 220).

CL_Colorf CL_Colorf::bisque
static

rgb(255, 228, 196).

CL_Colorf CL_Colorf::black
static

rgb( 0, 0, 0).

CL_Colorf CL_Colorf::blanchedalmond
static

rgb(255, 235, 205).

CL_Colorf CL_Colorf::blue
static

rgb( 0, 0, 255).

CL_Colorf CL_Colorf::blueviolet
static

rgb(138, 43, 226).

CL_Colorf CL_Colorf::brown
static

rgb(165, 42, 42).

CL_Colorf CL_Colorf::burlywood
static

rgb(222, 184, 135).

CL_Colorf CL_Colorf::cadetblue
static

rgb( 95, 158, 160).

CL_Colorf CL_Colorf::chartreuse
static

rgb(127, 255, 0).

CL_Colorf CL_Colorf::chocolate
static

rgb(210, 105, 30).

CL_Colorf CL_Colorf::coral
static

rgb(255, 127, 80).

CL_Colorf CL_Colorf::cornflowerblue
static

rgb(100, 149, 237).

CL_Colorf CL_Colorf::cornsilk
static

rgb(255, 248, 220).

CL_Colorf CL_Colorf::crimson
static

rgb(220, 20, 60).

CL_Colorf CL_Colorf::cyan
static

rgb( 0, 255, 255).

CL_Colorf CL_Colorf::darkblue
static

rgb( 0, 0, 139).

CL_Colorf CL_Colorf::darkcyan
static

rgb( 0, 139, 139).

CL_Colorf CL_Colorf::darkgoldenrod
static

rgb(184, 134, 11).

CL_Colorf CL_Colorf::darkgray
static

rgb(169, 169, 169).

CL_Colorf CL_Colorf::darkgreen
static

rgb( 0, 100, 0).

CL_Colorf CL_Colorf::darkgrey
static

rgb(169, 169, 169).

CL_Colorf CL_Colorf::darkkhaki
static

rgb(189, 183, 107).

CL_Colorf CL_Colorf::darkmagenta
static

rgb(139, 0, 139).

CL_Colorf CL_Colorf::darkolivegreen
static

rgb( 85, 107, 47).

CL_Colorf CL_Colorf::darkorange
static

rgb(255, 140, 0).

CL_Colorf CL_Colorf::darkorchid
static

rgb(153, 50, 204).

CL_Colorf CL_Colorf::darkred
static

rgb(139, 0, 0).

CL_Colorf CL_Colorf::darksalmon
static

rgb(233, 150, 122).

CL_Colorf CL_Colorf::darkseagreen
static

rgb(143, 188, 143).

CL_Colorf CL_Colorf::darkslateblue
static

rgb( 72, 61, 139).

CL_Colorf CL_Colorf::darkslategray
static

rgb( 47, 79, 79).

CL_Colorf CL_Colorf::darkslategrey
static

rgb( 47, 79, 79).

CL_Colorf CL_Colorf::darkturquoise
static

rgb( 0, 206, 209).

CL_Colorf CL_Colorf::darkviolet
static

rgb(148, 0, 211).

CL_Colorf CL_Colorf::deeppink
static

rgb(255, 20, 147).

CL_Colorf CL_Colorf::deepskyblue
static

rgb( 0, 191, 255).

CL_Colorf CL_Colorf::dimgray
static

rgb(105, 105, 105).

CL_Colorf CL_Colorf::dimgrey
static

rgb(105, 105, 105).

CL_Colorf CL_Colorf::dodgerblue
static

rgb( 30, 144, 255).

CL_Colorf CL_Colorf::firebrick
static

rgb(178, 34, 34).

CL_Colorf CL_Colorf::floralwhite
static

rgb(255, 250, 240).

CL_Colorf CL_Colorf::forestgreen
static

rgb( 34, 139, 34).

CL_Colorf CL_Colorf::fuchsia
static

rgb(255, 0, 255).

float CL_Colorf::g
CL_Colorf CL_Colorf::gainsboro
static

rgb(220, 220, 220).

CL_Colorf CL_Colorf::ghostwhite
static

rgb(248, 248, 255).

CL_Colorf CL_Colorf::gold
static

rgb(255, 215, 0).

CL_Colorf CL_Colorf::goldenrod
static

rgb(218, 165, 32).

CL_Colorf CL_Colorf::gray
static

rgb(128, 128, 128).

CL_Colorf CL_Colorf::gray10
static
CL_Colorf CL_Colorf::gray20
static
CL_Colorf CL_Colorf::gray30
static
CL_Colorf CL_Colorf::gray40
static
CL_Colorf CL_Colorf::gray50
static
CL_Colorf CL_Colorf::gray60
static
CL_Colorf CL_Colorf::gray70
static
CL_Colorf CL_Colorf::gray80
static
CL_Colorf CL_Colorf::gray90
static
CL_Colorf CL_Colorf::green
static

rgb( 0, 128, 0).

CL_Colorf CL_Colorf::greenyellow
static

rgb(173, 255, 47).

CL_Colorf CL_Colorf::grey
static

rgb(128, 128, 128).

CL_Colorf CL_Colorf::honeydew
static

rgb(240, 255, 240).

CL_Colorf CL_Colorf::hotpink
static

rgb(255, 105, 180).

CL_Colorf CL_Colorf::indianred
static

rgb(205, 92, 92).

CL_Colorf CL_Colorf::indigo
static

rgb( 75, 0, 130).

CL_Colorf CL_Colorf::ivory
static

rgb(255, 255, 240).

CL_Colorf CL_Colorf::khaki
static

rgb(240, 230, 140).

CL_Colorf CL_Colorf::lavender
static

rgb(230, 230, 250).

CL_Colorf CL_Colorf::lavenderblush
static

rgb(255, 240, 245).

CL_Colorf CL_Colorf::lawngreen
static

rgb(124, 252, 0).

CL_Colorf CL_Colorf::lemonchiffon
static

rgb(255, 250, 205).

CL_Colorf CL_Colorf::lightblue
static

rgb(173, 216, 230).

CL_Colorf CL_Colorf::lightcoral
static

rgb(240, 128, 128).

CL_Colorf CL_Colorf::lightcyan
static

rgb(224, 255, 255).

CL_Colorf CL_Colorf::lightgoldenrodyellow
static

rgb(250, 250, 210).

CL_Colorf CL_Colorf::lightgray
static

rgb(211, 211, 211).

CL_Colorf CL_Colorf::lightgreen
static

rgb(144, 238, 144).

CL_Colorf CL_Colorf::lightgrey
static

rgb(211, 211, 211).

CL_Colorf CL_Colorf::lightpink
static

rgb(255, 182, 193).

CL_Colorf CL_Colorf::lightsalmon
static

rgb(255, 160, 122).

CL_Colorf CL_Colorf::lightseagreen
static

rgb( 32, 178, 170).

CL_Colorf CL_Colorf::lightskyblue
static

rgb(135, 206, 250).

CL_Colorf CL_Colorf::lightslategray
static

rgb(119, 136, 153).

CL_Colorf CL_Colorf::lightslategrey
static

rgb(119, 136, 153).

CL_Colorf CL_Colorf::lightsteelblue
static

rgb(176, 196, 222).

CL_Colorf CL_Colorf::lightyellow
static

rgb(255, 255, 224).

CL_Colorf CL_Colorf::lime
static

rgb( 0, 255, 0).

CL_Colorf CL_Colorf::limegreen
static

rgb( 50, 205, 50).

CL_Colorf CL_Colorf::linen
static

rgb(250, 240, 230).

CL_Colorf CL_Colorf::magenta
static

rgb(255, 0, 255).

CL_Colorf CL_Colorf::maroon
static

rgb(128, 0, 0).

CL_Colorf CL_Colorf::mediumaquamarine
static

rgb(102, 205, 170).

CL_Colorf CL_Colorf::mediumblue
static

rgb( 0, 0, 205).

CL_Colorf CL_Colorf::mediumorchid
static

rgb(186, 85, 211).

CL_Colorf CL_Colorf::mediumpurple
static

rgb(147, 112, 219).

CL_Colorf CL_Colorf::mediumseagreen
static

rgb( 60, 179, 113).

CL_Colorf CL_Colorf::mediumslateblue
static

rgb(123, 104, 238).

CL_Colorf CL_Colorf::mediumspringgreen
static

rgb( 0, 250, 154).

CL_Colorf CL_Colorf::mediumturquoise
static

rgb( 72, 209, 204).

CL_Colorf CL_Colorf::mediumvioletred
static

rgb(199, 21, 133).

CL_Colorf CL_Colorf::midnightblue
static

rgb( 25, 25, 112).

CL_Colorf CL_Colorf::mintcream
static

rgb(245, 255, 250).

CL_Colorf CL_Colorf::mistyrose
static

rgb(255, 228, 225).

CL_Colorf CL_Colorf::moccasin
static

rgb(255, 228, 181).

CL_Colorf CL_Colorf::navajowhite
static

rgb(255, 222, 173).

CL_Colorf CL_Colorf::navy
static

rgb( 0, 0, 128).

CL_Colorf CL_Colorf::oldlace
static

rgb(253, 245, 230).

CL_Colorf CL_Colorf::olive
static

rgb(128, 128, 0).

CL_Colorf CL_Colorf::olivedrab
static

rgb(107, 142, 35).

CL_Colorf CL_Colorf::orange
static

rgb(255, 165, 0).

CL_Colorf CL_Colorf::orangered
static

rgb(255, 69, 0).

CL_Colorf CL_Colorf::orchid
static

rgb(218, 112, 214).

CL_Colorf CL_Colorf::palegoldenrod
static

rgb(238, 232, 170).

CL_Colorf CL_Colorf::palegreen
static

rgb(152, 251, 152).

CL_Colorf CL_Colorf::paleturquoise
static

rgb(175, 238, 238).

CL_Colorf CL_Colorf::palevioletred
static

rgb(219, 112, 147).

CL_Colorf CL_Colorf::papayawhip
static

rgb(255, 239, 213).

CL_Colorf CL_Colorf::peachpuff
static

rgb(255, 218, 185).

CL_Colorf CL_Colorf::peru
static

rgb(205, 133, 63).

CL_Colorf CL_Colorf::pink
static

rgb(255, 192, 203).

CL_Colorf CL_Colorf::plum
static

rgb(221, 160, 221).

CL_Colorf CL_Colorf::powderblue
static

rgb(176, 224, 230).

CL_Colorf CL_Colorf::purple
static

rgb(128, 0, 128).

float CL_Colorf::r
CL_Colorf CL_Colorf::red
static

rgb(255, 0, 0).

CL_Colorf CL_Colorf::rosybrown
static

rgb(188, 143, 143).

CL_Colorf CL_Colorf::royalblue
static

rgb( 65, 105, 225).

CL_Colorf CL_Colorf::saddlebrown
static

rgb(139, 69, 19).

CL_Colorf CL_Colorf::salmon
static

rgb(250, 128, 114).

CL_Colorf CL_Colorf::sandybrown
static

rgb(244, 164, 96).

CL_Colorf CL_Colorf::seagreen
static

rgb( 46, 139, 87).

CL_Colorf CL_Colorf::seashell
static

rgb(255, 245, 238).

CL_Colorf CL_Colorf::sienna
static

rgb(160, 82, 45).

CL_Colorf CL_Colorf::silver
static

rgb(192, 192, 192).

CL_Colorf CL_Colorf::skyblue
static

rgb(135, 206, 235).

CL_Colorf CL_Colorf::slateblue
static

rgb(106, 90, 205).

CL_Colorf CL_Colorf::slategray
static

rgb(112, 128, 144).

CL_Colorf CL_Colorf::slategrey
static

rgb(112, 128, 144).

CL_Colorf CL_Colorf::snow
static

rgb(255, 250, 250).

CL_Colorf CL_Colorf::springgreen
static

rgb( 0, 255, 127).

CL_Colorf CL_Colorf::steelblue
static

rgb( 70, 130, 180).

CL_Colorf CL_Colorf::tan
static

rgb(210, 180, 140).

CL_Colorf CL_Colorf::teal
static

rgb( 0, 128, 128).

CL_Colorf CL_Colorf::thistle
static

rgb(216, 191, 216).

CL_Colorf CL_Colorf::tomato
static

rgb(255, 99, 71).

CL_Colorf CL_Colorf::transparent
static

rgba(0, 0, 0, 0).

CL_Colorf CL_Colorf::turquoise
static

rgb( 64, 224, 208).

CL_Colorf CL_Colorf::violet
static

rgb(238, 130, 238).

CL_Colorf CL_Colorf::wheat
static

rgb(245, 222, 179).

CL_Colorf CL_Colorf::white
static

rgb(255, 255, 255).

CL_Colorf CL_Colorf::whitesmoke
static

rgb(245, 245, 245).

CL_Colorf CL_Colorf::yellow
static

rgb(255, 255, 0).

CL_Colorf CL_Colorf::yellowgreen
static

rgb(154, 205, 50).


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