IGxColor.Value

Syntax

Value: Integer;

Description

The Value property returns the value of the color as a 32-bit value.

Comments

Color value contains four 8-bit components. The A component takes the 0 value that is why it is not used on calculation. The rest of the components are ranged in the following order: B, G, R. Color value is presented in the decimal format. If required, it can be used to get values of separate components by means of the following transformations:

  1. Cast the Value value to hexadecimal format.

  2. The obtained value is presented as six hexadecimal numbers; divide it into three combinations of two numbers.

  3. If each combination is cast to the decimal format, they correspond to values of separate components: B, G, R.

Example

  1. Value = 13382451^10 = CC3333^16. B = CC^16 = 204^10, G = 33^16 = 51^10 , R = 33^16 = 51^10. It corresponds to blue color hue.

  2. Value = 255^10 = FF^16. B = 0^16 = 0^10, G = 0^16 = 0^10 , R = FF^16 = 255^10. It corresponds to red color.

See also:

IGxColor