Instant properties: red

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

Declaration

uint8 color.red

Discussion

The read access to this property returns the red component of a color operand. The write access modifies the red component of a color operand. Other components (blue, green and alpha) are not affected by the modification. The red property is valid in range 0 .. 255 with the value 255 representing the maximal intensity. For example:

var color c = #FFFF007F; // Read the red value var uint8 result = c.red; // result = 255 // Modify the red value c.red = 200; // c = #C8FF007F

Usage in Inspector

When working with Inspector you can easily access, evaluate and modify the red 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: