Color

From Tygron Support wiki
Revision as of 12:28, 14 February 2020 by Rudolf@tygron.nl (talk | contribs) (Created page with "{{stub}} Many components with attributes automatically have a "COLOR" attribute added to them, the value of which is the same as the color property of that component. When tha...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This article is a stub.

Many components with attributes automatically have a "COLOR" attribute added to them, the value of which is the same as the color property of that component. When that color property is changed, the attribute is changed, and vice versa.

The numeric value of the attribute corresponds with an RGB color value, calculated by combining the red, green and blue values of the desired color together, multiplied by powers of 256. The amount of red, green, and blue are values between 0 and 255, inclusive. These are added to a base value of -16777216. A proper color value can be calculated as follows: -16777216 + (red * 256²) + (green * 256) + (blue).