CL_Colord Class Reference
[clanDisplay 2D]

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

#include <color.h>

List of all members.

Public Member Functions

Construction

 CL_Colord ()
 Constructs a color.
 CL_Colord (double r, double g, double b, double a=1.0)
 Constructs a color.
 CL_Colord (const double *array_rgba)
 Constructs a color.
 CL_Colord (unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
 Constructs a color.
 CL_Colord (const CL_Color &color)
 CL_Colord (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 (double value)
 Set alpha color component, in the range 0-1.
void set_red (double value)
 Set red color component, in the range 0-1.
void set_green (double value)
 Set green color component, in the range 0-1.
void set_blue (double value)
 Set blue color component, in the range 0-1.
bool operator== (const CL_Colord &c) const
 Color == Color operator (deep compare).
bool operator!= (const CL_Colord &c) const
 Color != Color operator (deep compare).
 operator CL_Color () const
 Type conversion operator.

Static Public Attributes

Statics

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

Attributes



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

Detailed Description

Floating point color description class (for double).


Constructor & Destructor Documentation

CL_Colord::CL_Colord (  )  [inline]

Constructs a color.

CL_Colord::CL_Colord ( double  r,
double  g,
double  b,
double  a = 1.0 
) [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_Colord::CL_Colord ( const double *  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_Colord::CL_Colord ( 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_Colord::CL_Colord ( const CL_Color color  )  [inline, explicit]
CL_Colord::CL_Colord ( 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

double CL_Colord::get_alpha (  )  const [inline]

Get Alpha.

Returns:
alpha

References a.

double CL_Colord::get_blue (  )  const [inline]

Get Blue.

Returns:
blue

References b.

double CL_Colord::get_green (  )  const [inline]

Get Green.

Returns:
green

References g.

double CL_Colord::get_red (  )  const [inline]

Get Red.

Returns:
red

References r.

void CL_Colord::normalize (  )  [inline]

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

References a, b, g, and r.

CL_Colord::operator CL_Color (  )  const [inline]

Type conversion operator.

bool CL_Colord::operator!= ( const CL_Colord c  )  const [inline]

Color != Color operator (deep compare).

References a, b, g, and r.

bool CL_Colord::operator== ( const CL_Colord c  )  const [inline]

Color == Color operator (deep compare).

References a, b, g, and r.

void CL_Colord::set_alpha ( double  value  )  [inline]

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

References a.

void CL_Colord::set_blue ( double  value  )  [inline]

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

References b.

void CL_Colord::set_green ( double  value  )  [inline]

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

References g.

void CL_Colord::set_red ( double  value  )  [inline]

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

References r.


Member Data Documentation

double CL_Colord::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).

double CL_Colord::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).

double CL_Colord::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).

double CL_Colord::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: