9#if !defined(OWL_COLOR_H)
13#if defined(BI_HAS_PRAGMA_ONCE)
23#define HLS(h,l,s) (static_cast<HLSCOLOR>((static_cast<BYTE>(h)|(static_cast<WORD>(static_cast<BYTE>(l))<<8))|((static_cast<DWORD>(static_cast<BYTE>(s)))<<16)))
24#define HLS_H(hls) (static_cast<BYTE>(hls))
25#define HLS_L(hls) (static_cast<BYTE>((static_cast<WORD>(hls)) >> 8))
26#define HLS_S(hls) (static_cast<BYTE>((hls)>>16))
61#define CLR_AQUAMARINE RGB(112, 219, 147)
64#define CLR_BAKERSCHOC RGB(92, 51, 23)
65#define CLR_BLACK RGB(0, 0, 0)
66#define CLR_BLUE RGB(0, 0, 255)
67#define CLR_BLUEVIOLET RGB(159, 95, 159)
68#define CLR_BRIGHTGOLD RGB(217, 217, 26)
69#define CLR_BRONZE1 RGB(140, 120, 36)
70#define CLR_BRONZE2 RGB(166, 125, 61)
71#define CLR_BROWN RGB(165, 42, 42)
74#define CLR_CADETBLUE RGB(95, 159, 159)
75#define CLR_CLEAR RGB(255, 255, 255)
76#define CLR_COOLCOPPER RGB(217, 135, 26)
77#define CLR_COPPER RGB(184, 115, 51)
78#define CLR_CORAL RGB(255, 127, 0)
79#define CLR_CORNFLOWERBLUE RGB(66, 66, 111)
80#define CLR_CYAN RGB(0, 255, 255)
83#define CLR_DARKBROWN RGB(92, 64, 51)
84#define CLR_DARKGREEN RGB(47, 79, 47)
85#define CLR_DARKOLIVEGREEN RGB(79, 79, 47)
86#define CLR_DARKORCHID RGB(153, 50, 204)
87#define CLR_DARKPURPLE RGB(135, 31, 120)
88#define CLR_DARKSLATEBLUE RGB(107, 35, 142)
89#define CLR_DARKSLATEGRAY RGB(47, 79, 79)
90#define CLR_DARKSLATEGREY RGB(47, 79, 79)
91#define CLR_DARKTAN RGB(150, 105, 79)
92#define CLR_DARKTURQUOISE RGB(112, 147, 219)
93#define CLR_DARKWOOD RGB(133, 94, 66)
94#define CLR_DIMGRAY RGB(84, 84, 84)
95#define CLR_DIMGREY RGB(84, 84, 84)
96#define CLR_DKGREENCOPPER RGB(74, 117, 110)
97#define CLR_DUSTYROSE RGB(133, 99, 99)
100#define CLR_FELDSPAR RGB(209, 145, 117)
101#define CLR_FIREBRICK RGB(142, 35, 35)
102#define CLR_FLESH RGB(245, 204, 176)
103#define CLR_FORESTGREEN RGB(35, 142, 35)
106#define CLR_GOLD RGB(204, 127, 50)
107#define CLR_GOLDENROD RGB(219, 219, 112)
108#define CLR_GRAY RGB(192, 192, 192)
109#define CLR_GRAY05 RGB(13, 13, 13)
110#define CLR_GRAY10 RGB(26, 26, 26)
111#define CLR_GRAY15 RGB(38, 38, 38)
112#define CLR_GRAY20 RGB(51, 51, 51)
113#define CLR_GRAY25 RGB(64, 64, 64)
114#define CLR_GRAY30 RGB(77, 77, 77)
115#define CLR_GRAY35 RGB(89, 89, 89)
116#define CLR_GRAY40 RGB(102, 102, 102)
117#define CLR_GRAY45 RGB(115, 115, 115)
118#define CLR_GRAY50 RGB(128, 128, 128)
119#define CLR_GRAY55 RGB(140, 140, 140)
120#define CLR_GRAY60 RGB(153, 153, 153)
121#define CLR_GRAY65 RGB(166, 166, 166)
122#define CLR_GRAY70 RGB(178, 178, 178)
123#define CLR_GRAY75 RGB(191, 191, 191)
124#define CLR_GRAY80 RGB(204, 204, 204)
125#define CLR_GRAY85 RGB(217, 217, 217)
126#define CLR_GRAY90 RGB(229, 229, 229)
127#define CLR_GRAY95 RGB(242, 242, 242)
128#define CLR_GREEN RGB(0, 255, 0)
129#define CLR_GREENCOPPER RGB(82, 125, 117)
130#define CLR_GREENYELLOW RGB(147, 219, 112)
131#define CLR_GREY RGB(192, 192, 192)
134#define CLR_HUNTERSGREEN RGB(33, 94, 79)
137#define CLR_INDIANRED RGB(79, 47, 47)
140#define CLR_KHAKI RGB(159, 159, 95)
143#define CLR_LIGHTBLUE RGB(191, 216, 216)
144#define CLR_LIGHTGRAY RGB(168, 168, 168)
145#define CLR_LIGHTGREY RGB(168, 168, 168)
146#define CLR_LIGHTSTEELBLUE RGB(143, 143, 188)
147#define CLR_LIGHTWOOD RGB(232, 194, 166)
148#define CLR_LIMEGREEN RGB(50, 204, 50)
151#define CLR_MAGENTA RGB(255, 0, 255)
152#define CLR_MANDARINORANGE RGB(227, 120, 51)
153#define CLR_MAROON RGB(142, 35, 107)
154#define CLR_MEDIUMAQUAMARINE RGB(50, 204, 153)
155#define CLR_MEDIUMBLUE RGB(50, 50, 204)
156#define CLR_MEDIUMFORESTGREEN RGB(107, 142, 35)
157#define CLR_MEDIUMGOLDENROD RGB(234, 234, 173)
158#define CLR_MEDIUMORCHID RGB(147, 112, 219)
159#define CLR_MEDIUMSEAGREEN RGB(66, 111, 66)
160#define CLR_MEDIUMSLATEBLUE RGB(127, 0, 255)
161#define CLR_MEDIUMSPRINGGREEN RGB(127, 255, 0)
162#define CLR_MEDIUMTURQUOISE RGB(112, 219, 219)
163#define CLR_MEDIUMVIOLETRED RGB(219, 112, 147)
164#define CLR_MEDIUMWOOD RGB(166, 128, 99)
165#define CLR_MICA RGB(0, 0, 0)
166#define CLR_MIDNIGHTBLUE RGB(47, 47, 79)
169#define CLR_NAVY RGB(35, 35, 142)
170#define CLR_NAVYBLUE RGB(35, 35, 142)
171#define CLR_NEONBLUE RGB(77, 77, 255)
172#define CLR_NEONPINK RGB(255, 110, 199)
173#define CLR_NEWMIDNIGHTBLUE RGB(0, 0, 156)
174#define CLR_NEWTAN RGB(235, 199, 158)
177#define CLR_OFFWHITE RGB(240, 240, 240)
178#define CLR_ORANGE RGB(255, 128, 0)
179#define CLR_ORANGERED RGB(255, 0, 127)
180#define CLR_ORCHID RGB(219, 112, 219)
183#define CLR_PALEGREEN RGB(143, 188, 143)
184#define CLR_PINK RGB(188, 143, 143)
185#define CLR_PLUM RGB(234, 173, 234)
188#define CLR_QUARTZ RGB(217, 217, 242)
191#define CLR_RED RGB(255, 0, 0)
192#define CLR_RICHBLUE RGB(89, 89, 171)
195#define CLR_SALMON RGB(111, 66, 66)
196#define CLR_SCARLET RGB(140, 23, 23)
197#define CLR_SEAGREEN RGB(35, 142, 107)
198#define CLR_SEMISWEETCHOC RGB(107, 66, 38)
199#define CLR_SIENNA RGB(142, 107, 35)
200#define CLR_SILVER RGB(229, 232, 250)
201#define CLR_SKYBLUE RGB(50, 153, 204)
202#define CLR_SLATEBLUE RGB(0, 127, 255)
203#define CLR_SPICYPINK RGB(255, 28, 173)
204#define CLR_SPRINGGREEN RGB(0, 255, 127)
205#define CLR_STEELBLUE RGB(35, 107, 142)
206#define CLR_SUMMERSKY RGB(56, 176, 222)
209#define CLR_TAN RGB(219, 147, 112)
210#define CLR_THISTLE RGB(216, 191, 216)
211#define CLR_TURQUOISE RGB(173, 234, 234)
214#define CLR_VERYDARKBROWN RGB(89, 41, 36)
215#define CLR_VIOLET RGB(79, 47, 79)
216#define CLR_VIOLETRED RGB(204, 50, 153)
217#define CLR_VLIGHTGREY RGB(204, 204, 204)
220#define CLR_WHEAT RGB(216, 216, 191)
221#define CLR_WHITE RGB(255, 255, 255)
224#define CLR_YELLOW RGB(255, 255, 0)
225#define CLR_YELLOWGREEN RGB(153, 204, 50)
261 static TColor CreateFromPaletteIndex(
int index);
283 TColor PalRelative()
const;
289 bool IsSysColor()
const;
290 bool IsSpecialColor()
const;
631 return Value ==
other.Value;
642 return Value !=
other.Value;
692 return (
int)Value & 0xFFFF;
731 return static_cast<uint8>(
static_cast<uint16>((Value >> 24)));
740 return (Value & 0xF0000000UL) == 0x80000000UL;
751 return (Value & 0xF0000000UL) == 0xF0000000UL;
Class wrapper for management of color values.
static const TColor SysGrayText
The symbolic system color value for grayed (disabled) text.
COLORREF GetValue() const
Get a 32bit COLORREF type from this color object.
static const TColor LtBlue
Static TColor object with fixed Value set by RGB(0, 0, 255).
static const TColor SysInfoBk
The symbolic system color value for the background of tooltip controls.
TColor PalRelative() const
Return the palette relative entry.
static const TColor SysMenuText
The symbolic system color value for the text shown on menus.
static const TColor SysHighlightText
The symbolic system color value for text selected in a control.
static const TColor LtMagenta
Static TColor object with fixed Value set by RGB(255, 0, 255).
static const TColor SysBtnText
The symbolic system color value for the text on buttons.
static const TColor Transparent
a non-painting color
static const TColor SysHighlight
The symbolic system color value for items selected in a control.
static const TColor SysActiveCaption
The symbolic system color value for the caption of the active window.
static const TColor Sys3dHilight
The symbolic system color value for highlighted 3-dimensional display elements (for edges facing the ...
static const TColor SysCaptionText
The symbolic system color value for text in captions and size boxes, and for the arrow boxes on scrol...
static const TColor None
not-a-color
static const TColor SysActiveBorder
The symbolic system color value for the borders of the active window.
static const TColor LtCyan
Static TColor object with fixed Value set by RGB(0, 255, 255).
bool operator!=(const TColor &other) const
Return true if two colors are not equal.
static const TColor SysDesktop
The symbolic system color value for the desktop.
bool operator==(const TColor &other) const
Return true if two colors are equal.
static const TColor Sys3dDkShadow
The symbolic system color value for dark shadow regions of 3-dimensional display elements.
TColor & operator=(const TColor &src)
Set the value of color after it has been constructed.
static const TColor SysInactiveCaption
The symbolic system color value for the caption background of every inactive window.
static const TColor SysInactiveCaptionText
The symbolic system color value for the caption text of every inactive window.
int Index() const
Return the index of the palette entry.
static const TColor SysWindowFrame
The symbolic system color value for the frame around each window.
void SetValue(const COLORREF &value)
Change the color after it has been constructed.
TColor Rgb() const
Return the RGB color value.
static const TColor SysScrollbar
The symbolic system color value for what is usually the gray area of scrollbars.
TColor()
Construct a null color.
static const TColor LtYellow
Static TColor object with fixed Value set by RGB(255, 255, 0).
TColor PalIndex() const
Return the palette index.
static const TColor SysInfoText
The symbolic system color value for text shown on tooltip controls.
bool IsSysColor() const
Return true if the color is a system color.
static const TColor LtGray
Static TColor object with fixed Value set by RGB(192, 192, 192).
static const TColor SysWindowText
The symbolic system color value for text in every window.
static const TColor Sys3dShadow
The symbolic system color value for the shadow regions of 3-dimensional display elements (for edges f...
static const TColor SysAppWorkspace
The symbolic system color value for the background of multiple document interface (MDI) applications.
uint8 Flags() const
Return the flags entry.
static const TColor Sys3dFace
The symbolic system color value for the face color of 3-dimensional display elements.
static const TColor LtGreen
Static TColor object with fixed Value set by RGB(0, 255, 0).
static const TColor SysMenu
The symbolic system color value for the background of menus.
static const TColor SysInactiveBorder
The symbolic system color value for the borders of every inactive window.
static const TColor Gray
Static TColor object with fixed Value set by RGB(128, 128, 128).
static const TColor Sys3dLight
The symbolic system color value for the light color for 3-dimensional display elements (for edges fac...
static const TColor White
Static TColor object with fixed Value set by RGB(255, 255, 255).
static TColor CreateFromPaletteIndex(int index)
Construct a color that is an index into a palette.
static const TColor SysWindow
The symbolic system color value for the background of each window.
static const TColor LtRed
Static TColor object with fixed Value set by RGB(255, 0, 0).
bool IsSpecialColor() const
Return true if the color is a special color (currently None or Transparent)
static const TColor Black
Static TColor object with fixed Value set by RGB(0, 0, 0).
Wrapper for Windows' PALETTEENTRY type.
TPaletteEntry(int r, int g, int b, int f=0)
Creates a palette entry object with peRed, peGreen, peBlue, and peFlags set to r, g,...
bool operator==(COLORREF cr) const
Returns true if the palette entries have the same color components.
Wrapper for Windows' RBGQUAD type.
bool operator==(COLORREF cr) const
Return true if the RGBQUAD has the same color components.
TRgbQuad(int r, int g, int b)
Creates a TRgbQuad object with rgbRed, rgbGreen, and rgbBlue set to r, g, and b respectively.
Wrapper for Windows' RBGTRIPLE type.
TRgbTriple(int r, int g, int b)
Creates a TRgbTriple object with rgbRed, rgbGreen, and rgbBlue set to r, g, and b respectively.
bool operator==(COLORREF cr) const
Return true if the triple match color components.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Base class for writing streamable objects.
Object Windows Library (OWLNext Core)
COLORREF MkRGB(uint r, uint g, uint b)
owl::opstream & operator<<(owl::opstream &os, const TColor &c)
Insert the color value into a persistent output stream.
long NColors(uint16 bitCount)
Functions to convert number of bits to number of palette colors and back, and build an RGB COLORREF.
uint16 NBits(long colors)
Return the number of bits required to represent a given number of colors.
owl::ipstream & operator>>(owl::ipstream &is, TColor &c)
Extract the color value from a persistent input stream.
Includes windowing system headers, with necessary macros defined.