CL_Colorf Class Reference
[clanDisplay 2D]

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

#include <color.h>

List of all members.

Public Member Functions

Construction

 CL_Colorf ()
 Constructs a color.
 CL_Colorf (float r, float g, float b, float a=1.0f)
 Constructs a color.
 CL_Colorf (const float *array_rgba)
 Constructs a color.
 CL_Colorf (unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
 Constructs a color.
 CL_Colorf (int r, int g, int b, int a=255)
 Constructs a color.
 CL_Colorf (const CL_Color &color)
 CL_Colorf (const CL_StringRef &hexstr)
 Constructs a color.
Operations

void normalize ()
 Normalize the color by ensuring that all color values lie inbetween (0.0, 1.0).
void set_alpha (float value)
 Set alpha color component, in the range 0-1.
void set_red (float value)
 Set red color component, in the range 0-1.
void set_green (float value)
 Set green color component, in the range 0-1.
void set_blue (float value)
 Set blue color component, in the range 0-1.
bool operator== (const CL_Colorf &c) const
 Color == Color operator (deep compare).
bool operator!= (const CL_Colorf &c) const
 Color != Color operator (deep compare).
 operator CL_Color () const
 Type conversion operator.

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).
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.
float get_green () const
 Get Green.
float get_blue () const
 Get Blue.
float get_alpha () const
 Get Alpha.

Detailed Description

Floating point color description class (for float).


Constructor & Destructor Documentation

CL_Colorf::CL_Colorf (  )  [inline]

Constructs a color.

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  )  [inline, explicit]
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:
hexstr The colors rgba components as a hexadecimal string of the format "#rrggbbaa", where the '#' and "aa" parts are optional.

References 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
aliceblue-chip.png

rgb(240, 248, 255).

antiquewhite-chip.png

rgb(250, 235, 215).

aqua-chip.png

rgb( 0, 255, 255).

aquamarine-chip.png

rgb(127, 255, 212).

azure-chip.png

rgb(240, 255, 255).

float CL_Colorf::b
beige-chip.png

rgb(245, 245, 220).

bisque-chip.png

rgb(255, 228, 196).

black-chip.png

rgb( 0, 0, 0).

blanchedalmond-chip.png

rgb(255, 235, 205).

blue-chip.png

rgb( 0, 0, 255).

blueviolet-chip.png

rgb(138, 43, 226).

brown-chip.png

rgb(165, 42, 42).

burlywood-chip.png

rgb(222, 184, 135).

cadetblue-chip.png

rgb( 95, 158, 160).

chartreuse-chip.png

rgb(127, 255, 0).

chocolate-chip.png

rgb(210, 105, 30).

coral-chip.png

rgb(255, 127, 80).

cornflowerblue-chip.png

rgb(100, 149, 237).

cornsilk-chip.png

rgb(255, 248, 220).

crimson-chip.png

rgb(220, 20, 60).

cyan-chip.png

rgb( 0, 255, 255).

darkblue-chip.png

rgb( 0, 0, 139).

darkcyan-chip.png

rgb( 0, 139, 139).

darkgoldenrod-chip.png

rgb(184, 134, 11).

darkgray-chip.png

rgb(169, 169, 169).

darkgreen-chip.png

rgb( 0, 100, 0).

darkgrey-chip.png

rgb(169, 169, 169).

darkkhaki-chip.png

rgb(189, 183, 107).

darkmagenta-chip.png

rgb(139, 0, 139).

darkolivegreen-chip.png

rgb( 85, 107, 47).

darkorange-chip.png

rgb(255, 140, 0).

darkorchid-chip.png

rgb(153, 50, 204).

darkred-chip.png

rgb(139, 0, 0).

darksalmon-chip.png

rgb(233, 150, 122).

darkseagreen-chip.png

rgb(143, 188, 143).

darkslateblue-chip.png

rgb( 72, 61, 139).

darkslategray-chip.png

rgb( 47, 79, 79).

darkslategrey-chip.png

rgb( 47, 79, 79).

darkturquoise-chip.png

rgb( 0, 206, 209).

darkviolet-chip.png

rgb(148, 0, 211).

deeppink-chip.png

rgb(255, 20, 147).

deepskyblue-chip.png

rgb( 0, 191, 255).

dimgray-chip.png

rgb(105, 105, 105).

dimgrey-chip.png

rgb(105, 105, 105).

dodgerblue-chip.png

rgb( 30, 144, 255).

firebrick-chip.png

rgb(178, 34, 34).

floralwhite-chip.png

rgb(255, 250, 240).

forestgreen-chip.png

rgb( 34, 139, 34).

fuchsia-chip.png

rgb(255, 0, 255).

float CL_Colorf::g
gainsboro-chip.png

rgb(220, 220, 220).

ghostwhite-chip.png

rgb(248, 248, 255).

gold-chip.png

rgb(255, 215, 0).

goldenrod-chip.png

rgb(218, 165, 32).

gray-chip.png

rgb(128, 128, 128).

green-chip.png

rgb( 0, 128, 0).

greenyellow-chip.png

rgb(173, 255, 47).

grey-chip.png

rgb(128, 128, 128).

honeydew-chip.png

rgb(240, 255, 240).

hotpink-chip.png

rgb(255, 105, 180).

indianred-chip.png

rgb(205, 92, 92).

indigo-chip.png

rgb( 75, 0, 130).

ivory-chip.png

rgb(255, 255, 240).

khaki-chip.png

rgb(240, 230, 140).

lavender-chip.png

rgb(230, 230, 250).

lavenderblush-chip.png

rgb(255, 240, 245).

lawngreen-chip.png

rgb(124, 252, 0).

lemonchiffon-chip.png

rgb(255, 250, 205).

lightblue-chip.png

rgb(173, 216, 230).

lightcoral-chip.png

rgb(240, 128, 128).

lightcyan-chip.png

rgb(224, 255, 255).

lightgoldenrodyellow-chip.png

rgb(250, 250, 210).

lightgray-chip.png

rgb(211, 211, 211).

lightgreen-chip.png

rgb(144, 238, 144).

lightgrey-chip.png

rgb(211, 211, 211).

lightpink-chip.png

rgb(255, 182, 193).

lightsalmon-chip.png

rgb(255, 160, 122).

lightseagreen-chip.png

rgb( 32, 178, 170).

lightskyblue-chip.png

rgb(135, 206, 250).

lightslategray-chip.png

rgb(119, 136, 153).

lightslategrey-chip.png

rgb(119, 136, 153).

lightsteelblue-chip.png

rgb(176, 196, 222).

lightyellow-chip.png

rgb(255, 255, 224).

lime-chip.png

rgb( 0, 255, 0).

limegreen-chip.png

rgb( 50, 205, 50).

linen-chip.png

rgb(250, 240, 230).

magenta-chip.png

rgb(255, 0, 255).

maroon-chip.png

rgb(128, 0, 0).

mediumaquamarine-chip.png

rgb(102, 205, 170).

mediumblue-chip.png

rgb( 0, 0, 205).

mediumorchid-chip.png

rgb(186, 85, 211).

mediumpurple-chip.png

rgb(147, 112, 219).

mediumseagreen-chip.png

rgb( 60, 179, 113).

mediumslateblue-chip.png

rgb(123, 104, 238).

mediumspringgreen-chip.png

rgb( 0, 250, 154).

mediumturquoise-chip.png

rgb( 72, 209, 204).

mediumvioletred-chip.png

rgb(199, 21, 133).

midnightblue-chip.png

rgb( 25, 25, 112).

mintcream-chip.png

rgb(245, 255, 250).

mistyrose-chip.png

rgb(255, 228, 225).

moccasin-chip.png

rgb(255, 228, 181).

navajowhite-chip.png

rgb(255, 222, 173).

navy-chip.png

rgb( 0, 0, 128).

oldlace-chip.png

rgb(253, 245, 230).

olive-chip.png

rgb(128, 128, 0).

olivedrab-chip.png

rgb(107, 142, 35).

orange-chip.png

rgb(255, 165, 0).

orangered-chip.png

rgb(255, 69, 0).

orchid-chip.png

rgb(218, 112, 214).

palegoldenrod-chip.png

rgb(238, 232, 170).

palegreen-chip.png

rgb(152, 251, 152).

paleturquoise-chip.png

rgb(175, 238, 238).

palevioletred-chip.png

rgb(219, 112, 147).

papayawhip-chip.png

rgb(255, 239, 213).

peachpuff-chip.png

rgb(255, 218, 185).

peru-chip.png

rgb(205, 133, 63).

pink-chip.png

rgb(255, 192, 203).

plum-chip.png

rgb(221, 160, 221).

powderblue-chip.png

rgb(176, 224, 230).

purple-chip.png

rgb(128, 0, 128).

float CL_Colorf::r
red-chip.png

rgb(255, 0, 0).

rosybrown-chip.png

rgb(188, 143, 143).

royalblue-chip.png

rgb( 65, 105, 225).

saddlebrown-chip.png

rgb(139, 69, 19).

salmon-chip.png

rgb(250, 128, 114).

sandybrown-chip.png

rgb(244, 164, 96).

seagreen-chip.png

rgb( 46, 139, 87).

seashell-chip.png

rgb(255, 245, 238).

sienna-chip.png

rgb(160, 82, 45).

silver-chip.png

rgb(192, 192, 192).

skyblue-chip.png

rgb(135, 206, 235).

slateblue-chip.png

rgb(106, 90, 205).

slategray-chip.png

rgb(112, 128, 144).

slategrey-chip.png

rgb(112, 128, 144).

snow-chip.png

rgb(255, 250, 250).

springgreen-chip.png

rgb( 0, 255, 127).

steelblue-chip.png

rgb( 70, 130, 180).

tan-chip.png

rgb(210, 180, 140).

teal-chip.png

rgb( 0, 128, 128).

thistle-chip.png

rgb(216, 191, 216).

tomato-chip.png

rgb(255, 99, 71).

rgba(0, 0, 0, 0).

turquoise-chip.png

rgb( 64, 224, 208).

violet-chip.png

rgb(238, 130, 238).

wheat-chip.png

rgb(245, 222, 179).

white-chip.png

rgb(255, 255, 255).

whitesmoke-chip.png

rgb(245, 245, 245).

yellow-chip.png

rgb(255, 255, 0).

yellowgreen-chip.png

rgb(154, 205, 50).


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