CGAL 6.0.1 - IO Streams
|
#include <CGAL/IO/Color.h>
An object of the class Color
is a color available for drawing operations in many CGAL output streams.
Each color is defined by a 4 unsigned chars (r,g,b,a)
with 0 \(\le\) r,g,b,a \( \le \) 255, the so-called rgba-value of the color.
The alpha parameter (representing transparency) is often ignored and left to its default value (255 = no transparency), which is why we often refer to the rgb-value of the color.
Related Functions | |
(Note that these are not member functions.) | |
Color | black () |
Constructs Color(0,0,0). | |
Color | blue () |
Constructs Color(0,0,255). | |
Color | deep_blue () |
Constructs Color(10,0,100). | |
Color | gray () |
Constructs Color(100,100,100). | |
Color | green () |
Constructs Color(0,255,0). | |
Color | orange () |
Constructs Color(235,150,0). | |
Color | purple () |
Constructs Color(100,0,70). | |
Color | red () |
Constructs Color(255,0,0). | |
Color | violet () |
Constructs Color(255,0,255). | |
Color | white () |
Constructs Color(255,255,255). | |
Color | yellow () |
Constructs Color(255,255,0). | |
Creation | |
Color () | |
creates a color with rgba-value (0,0,0,255) , i.e. black. | |
Color (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255) | |
creates a color with rgba-value (red,green,blue,alpha) . | |
Modification | |
Color & | set_rgb (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255) |
replaces the rgb values of the colors by the one given as parameters. | |
Color & | set_hsv (double hue, double saturation, double value, unsigned char alpha=255) |
replaces the rgb values of the colors by the conversion to rgb of the hsv values given as parameters. | |