Color: Difference between revisions
Jump to navigation
Jump to search
(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...") |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{stub}} | {{stub}} | ||
Many components with | Many components with [[attribute]]s 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). | 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). | ||
[[Category:unit]] | [[Category:unit]] |
Revision as of 12:29, 14 February 2020
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).