Instant properties: alpha

The instant property alpha corresponds to the alpha component stored within a color operand.

Declaration

uint8 color.alpha

Discussion

The read access to this property returns the alpha component of a color operand. The write access modifies the alpha component of a color operand. Other components (red, green and blue) are not affected by the modification. The alpha property is valid in range 0 .. 255 with the value 255 representing a fully opaque color, the value 0 representing a fully transparent color and all remaining values in between representing semitransparent colors. For example:

var color c = #FFFF007F; // Read the alpha value var uint8 result = c.alpha; // result = 127 // Modify the alpha value c.alpha = 200; // c = #FFFF00C8

Usage in Inspector

When working with Inspector you can easily access, evaluate and modify the alpha component. For this purpose select in Inspector the desired color property or attribute and click on the small triangle on its left side to expand and display the subordinated components: