Table of Contents

<Fundamental Types|User's Guide|Matrix>

see JavaDoc

ColorRGBA

Definition

ColorRGBA defines a color value in the jME library. The color value is made of three components, red, green and blue. A fourth component defines the alpha value (transparent) of the color. Every value is set between [0, 1]. Anything less than 0 will be clamped to 0 and anything greater than 1 will be clamped to 1.

Note: If you would like to “convert” an ordinary RGB value (0-255) to the format used here (0-1), simply multiply it with: 1/255.

jME Class

ColorRGBA defines a few static color values for ease of use. That is, rather than:

ColorRGBA red = new ColorRGBA(1,0,0,1);
object.setSomeColor(red);

you can simply say:

object.setSomeColor(ColorRGBA.red)

ColorRGBA will also handle interpolation between two colors. Given a second color and a value between 0 and 1, a the owning ColorRGBA object will have its color values altered to this new interpolated color.

<Fundamental Types|User's Guide|Matrix>


/var/www/wiki/data/pages/colorrgba.txt · Last modified: 2009/07/28 18:44 (external edit)  
Recent changes · Show pagesource · Login

Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki

subscribe to jME latest jme headlines


site design by bleedcrimson designs © 2008