$colour » History » Version 3
Per Amundsen, 02/16/2023 09:14 PM
| 1 | 1 | Per Amundsen | _Added in 1.9.0_ |
|---|---|---|---|
| 2 | |||
| 3 | *$colour(name/N)* |
||
| 4 | |||
| 5 | _Alias for [[$color]]_ |
||
| 6 | |||
| 7 | Returns the Nth color index of the specified color name. If you do not specify the full name the first partial match is returned. |
||
| 8 | |||
| 9 | 2 | Per Amundsen | _See also [[/color]], [[$ocolor]], [[Extra Colors]]._ |
| 10 | |||
| 11 | 1 | Per Amundsen | If you specify an N value, returns the RGB value for the Nth color box. |
| 12 | |||
| 13 | *Parameters* |
||
| 14 | |||
| 15 | 3 | Per Amundsen | table(ktable). |
| 16 | |*Parameter*|*Description*| |
||
| 17 | | name/N | Named color or Nth color to retrieve. | |
||
| 18 | 1 | Per Amundsen | |
| 19 | *Properties* |
||
| 20 | |||
| 21 | 3 | Per Amundsen | table(ktable). |
| 22 | |*Property*|*Description*| |
||
| 23 | | .dd | returns number in double-digit format. | |
||
| 24 | 1 | Per Amundsen | |
| 25 | *Example* |
||
| 26 | <pre> |
||
| 27 | ;Get the action color |
||
| 28 | //echo -ag action color is $color(action) |
||
| 29 | |||
| 30 | ;Get the action color by partial match in double digits |
||
| 31 | //echo -ag action color is $color(act).dd |
||
| 32 | |||
| 33 | ;Get the rgb value for color 5 |
||
| 34 | //echo -ag rgb value for 5 is $color(5) |
||
| 35 | </pre> |
||
| 36 | |||
| 37 |