FLTK colors: Difference between revisions
Jump to navigation
Jump to search
Created page with "File:FLTK color chart.png Source: https://www.fltk.org/doc-1.3/drawing.html" |
→Color macros: free colors |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{catnavbox|FLTK cheatsheets}} | |||
=== Colormap cheatsheet === | |||
[[File:FLTK color chart.png]] | [[File:FLTK color chart.png]] | ||
Source: https://www.fltk.org/doc-1.3/drawing.html | Source: https://www.fltk.org/doc-1.3/drawing.html | ||
=== Color hex numbers === | |||
The RGB part and the index part must not be non-zero at the same time. See: https://www.fltk.org/doc-1.3/Enumerations_8H.html<pre> | |||
Fl_Color => 0xrrggbbii | |||
| | | | | |||
| | | +--- index between 0 and 255 | |||
| | +----- blue color component (8 bit) | |||
| +------- green component (8 bit) | |||
+--------- red component (8 bit) | |||
</pre> | |||
=== Color macros === | |||
{| class="wikitable" | |||
|- | |||
| FL_FOREGROUND_COLOR | |||
| 0 | |||
|- | |||
| FL_BACKGROUND2_COLOR | |||
| 7 | |||
|- | |||
| FL_INACTIVE_COLOR | |||
| 8 | |||
|- | |||
| FL_SELECTION_COLOR | |||
| 15 | |||
|- | |||
| rowspan="3" |''Free colors'' | |||
''(User-defined palette items)'' | |||
|16 | |||
|- | |||
|⋮ | |||
|- | |||
|31 | |||
|- | |||
| FL_GRAY0 | |||
| 32 | |||
|- | |||
| FL_DARK3 | |||
| 39 | |||
|- | |||
| FL_DARK2 | |||
| 45 | |||
|- | |||
| FL_DARK1 | |||
| 47 | |||
|- | |||
| FL_BACKGROUND_COLOR | |||
| 49 | |||
|- | |||
| FL_LIGHT1 | |||
| 50 | |||
|- | |||
| FL_LIGHT2 | |||
| 52 | |||
|- | |||
| FL_LIGHT3 | |||
| 54 | |||
|- | |||
| FL_BLACK | |||
| 56 | |||
|- | |||
| FL_RED | |||
| 88 | |||
|- | |||
| FL_GREEN | |||
| 63 | |||
|- | |||
| FL_YELLOW | |||
| 95 | |||
|- | |||
| FL_BLUE | |||
| 216 | |||
|- | |||
| FL_MAGENTA | |||
| 248 | |||
|- | |||
| FL_CYAN | |||
| 223 | |||
|- | |||
| FL_DARK_RED | |||
| 72 | |||
|- | |||
| FL_DARK_GREEN | |||
| 60 | |||
|- | |||
| FL_DARK_YELLOW | |||
| 76 | |||
|- | |||
| FL_DARK_BLUE | |||
| 136 | |||
|- | |||
| FL_DARK_MAGENTA | |||
| 152 | |||
|- | |||
| FL_DARK_CYAN | |||
| 140 | |||
|- | |||
| FL_WHITE | |||
| 255 | |||
|} | |||
{{Page lang|en}} | |||
[[Category:Notes]] | |||
Latest revision as of 04:52, 27 February 2026
Colormap cheatsheet
Source: https://www.fltk.org/doc-1.3/drawing.html
Color hex numbers
The RGB part and the index part must not be non-zero at the same time. See: https://www.fltk.org/doc-1.3/Enumerations_8H.html
Fl_Color => 0xrrggbbii
| | | |
| | | +--- index between 0 and 255
| | +----- blue color component (8 bit)
| +------- green component (8 bit)
+--------- red component (8 bit)
Color macros
| FL_FOREGROUND_COLOR | 0 |
| FL_BACKGROUND2_COLOR | 7 |
| FL_INACTIVE_COLOR | 8 |
| FL_SELECTION_COLOR | 15 |
| Free colors
(User-defined palette items) |
16 |
| ⋮ | |
| 31 | |
| FL_GRAY0 | 32 |
| FL_DARK3 | 39 |
| FL_DARK2 | 45 |
| FL_DARK1 | 47 |
| FL_BACKGROUND_COLOR | 49 |
| FL_LIGHT1 | 50 |
| FL_LIGHT2 | 52 |
| FL_LIGHT3 | 54 |
| FL_BLACK | 56 |
| FL_RED | 88 |
| FL_GREEN | 63 |
| FL_YELLOW | 95 |
| FL_BLUE | 216 |
| FL_MAGENTA | 248 |
| FL_CYAN | 223 |
| FL_DARK_RED | 72 |
| FL_DARK_GREEN | 60 |
| FL_DARK_YELLOW | 76 |
| FL_DARK_BLUE | 136 |
| FL_DARK_MAGENTA | 152 |
| FL_DARK_CYAN | 140 |
| FL_WHITE | 255 |
