Color: Difference between revisions
Jump to navigation
Jump to search
m (Examples:) |
m (Update, mentioning rgb not rgba format) |
||
Line 1: | Line 1: | ||
Color is a format of an array. | |||
There're two types of “color” array. | |||
'''Format:''' | '''Format:''' | ||
[r, g, b, a] | <tt>[r, g, b]</tt> | ||
or | |||
<tt>[r, g, b, a]</tt> | |||
'''Description:''' | '''Description:''' | ||
Line 7: | Line 12: | ||
Color - r is the intensity of red, g is the intensity of green, b is the intensity of blue. | Color - r is the intensity of red, g is the intensity of green, b is the intensity of blue. | ||
a is alpha (opacity). An alpha value of 0 means totally transparent and a value of 1 means totally opaque. | a is alpha (opacity). An alpha value of 0 means totally transparent and a value of 1 means totally opaque. Some of the commands require/return alpha, some don't. | ||
All values range from 0 to 1. | All values range from 0 to 1. | ||
Line 13: | Line 18: | ||
'''Examples:''' | '''Examples:''' | ||
[0.3,0.3,0.5,1] | <code>[0.3,0.3,0.5,1] {{cc|mauve purple}}</code> | ||
[1,1,1,1] / | <code>[1,1,1,1] {{cc|white}}</code> | ||
[0,0.2,0,1] | <code>[0,0.2,0,1] {{cc|camo green}}</code> | ||
[0.73,0.24,0.11,1] | <code>[0.73,0.24,0.11,1] {{cc|Rust orange}}</code> | ||
[[Category: Arrays]] | [[Category: Arrays]] |
Revision as of 08:43, 4 August 2020
Color is a format of an array. There're two types of “color” array.
Format:
[r, g, b] or [r, g, b, a]
Description:
Color - r is the intensity of red, g is the intensity of green, b is the intensity of blue.
a is alpha (opacity). An alpha value of 0 means totally transparent and a value of 1 means totally opaque. Some of the commands require/return alpha, some don't.
All values range from 0 to 1.
Examples:
[0.3,0.3,0.5,1] // mauve purple
[1,1,1,1] // white
[0,0.2,0,1] // camo green
[0.73,0.24,0.11,1] // Rust orange