Color

Class for storing components of a color.

Operators

  • ostream& << Color
Summary
Class for storing components of a color.
Red component of color.
Green component of color.
Blue component of color.
Alpha component of color.
Initializes all components to 255.
Initializes color, component by component.
Creates color, component by component.
Makes the Color the current openGL color.

Variables

red

ubyte red

Red component of color.  (0-255)

green

ubyte green

Green component of color.  (0-255)

blue

ubyte blue

Blue component of color.  (0-255)

alpha

ubyte alpha

Alpha component of color.  (0-255)

(Con/ De)structors

Color

Color()

Initializes all components to 255.  (Solid White)

Color

Color(ubyte r,  
ubyte g,  
ubyte b,  
ubyte a = 255)

Initializes color, component by component.

Parameters

rValue for red component.
gValue for green component.
bValue for blue component.
aValue for alpha component.  [default: 255]

See Also

setColor

Utility

setColor

Creates color, component by component.

makeGLColor

Makes the Color the current openGL color.  (glColor4ub)

ubyte red
Red component of color.
ubyte green
Green component of color.
ubyte blue
Blue component of color.
ubyte alpha
Alpha component of color.
Color()
Initializes all components to 255.
Creates color, component by component.