WebbotLib AVR library
WebbotLib It just does it
  C++ documentation  C documentation

makeRGB

Copy the colour and convert it, if necessary, to the RGB color module.
Syntax
Color. makeRGB()
Color. makeRGB(dest)
 
Parameters
TypeNameDescription
'dest'
Where to store the resultant colour.
Returns
COLOR_RGB*
Note
If the color is already RGB then no conversion will take place.
The return value allows you to access the red, green and blue components of the colour.
Repeatedly converting from one colour space to another and back again will cause a loss of detail.
Example
// Create a YUV color
Color color1;
color1.setYUV(10,23,45);
  
// Copy it to color2 and
// convert color2 to RGB
Color color2;
COLOR_RGB* rgb = color1.makeRGB(color2);
 
// Print the rgb components
cout << "r=" << rgb->r << " g=" << rgb->g << " b=" << rgb->b;

 

 

Valid XHTML 1.0 Transitional