diff options
| author | engelsman <engelsman> | 2010-10-27 22:07:55 +0000 |
|---|---|---|
| committer | engelsman <engelsman> | 2010-10-27 22:07:55 +0000 |
| commit | fc1a878290197e5e4ec037e65662a90c8f5ce3a8 (patch) | |
| tree | e9bf12d97b919244116abe0d481c7d3bfa4e3edf /documentation/src/common.dox | |
| parent | b10ffb40d8e4b9eac1e47af53c8926e13d23d1a1 (diff) | |
reworked color documentation as suggested in STR #2373
part of the confusion was the main page link to
Common Widgets and Attributes/Colors actually went to
Drawing Things in FLTK/Colors therefore making it harder
to find information.
Common Widgets and Attribute/Colors now simplified
Drawing Things in FLTK/Colors now expanded
FLTK Enumerations/Colors now simplified
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7762 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'documentation/src/common.dox')
| -rw-r--r-- | documentation/src/common.dox | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/documentation/src/common.dox b/documentation/src/common.dox index 6b3e19587..37a068b26 100644 --- a/documentation/src/common.dox +++ b/documentation/src/common.dox @@ -174,6 +174,12 @@ colors or a 24-bit RGB color. The color palette is \e not the X or WIN32 colormap, but instead is an internal table with fixed contents. +See the +\ref drawing_colors +section of +\ref drawing +for implementation details. + There are symbols for naming some of the more common colors: \li \p FL_BLACK @@ -186,20 +192,23 @@ There are symbols for naming some of the more common colors: \li \p FL_WHITE \li \p FL_WHITE -These symbols are the default colors for all FLTK widgets. They are -explained in more detail under -\ref enumerations_colors in -\ref enumerations. +Other symbols are used as the default colors for all FLTK widgets. \li \p FL_FOREGROUND_COLOR \li \p FL_BACKGROUND_COLOR \li \p FL_INACTIVE_COLOR \li \p FL_SELECTION_COLOR -RGB colors can be set using the \p fl_rgb_color() function: +The full list of named color values can be found in +\ref enumerations_colors "FLTK Enumerations". + +A color value can be created from its RGB components by using the +\p %fl_rgb_color() function, and decomposed again with +\p Fl::get_color(): \code -Fl_Color c = fl_rgb_color(85, 170, 255); +Fl_Color c = fl_rgb_color(85, 170, 255); // RGB to Fl_Color +Fl::get_color(c, r, g, b); // Fl_Color to RGB \endcode The widget color is set using the \p color() method: |
