Class: ColorComponent

rune.color.ColorComponent()

Represents an 8-bit color component. Can be used for red, green, blue or alpha.

Constructor

new ColorComponent()

Creates a new 8-bit component.
Source:

Members

factor :number

The value of the component represented in a number from 0 to 1. The number 0.5 therefore corresponds to 127.5 in numerical form, or 7F in hexadecimal.
Type:
  • number
Source:

value :number

The current value of the component. A component is represented by eight bits and can thus be a value between 0 and 255. Invalid values will be squeezed within the allowable range.
Type:
  • number
Source:

Methods

toString() → {string}

Returns a string representation of the current component value in hexadecimal.
Source:
Returns:
Type
string