color.h

Go to the documentation of this file.
00001 /*
00002 **  ClanLib SDK
00003 **  Copyright (c) 1997-2009 The ClanLib Team
00004 **
00005 **  This software is provided 'as-is', without any express or implied
00006 **  warranty.  In no event will the authors be held liable for any damages
00007 **  arising from the use of this software.
00008 **
00009 **  Permission is granted to anyone to use this software for any purpose,
00010 **  including commercial applications, and to alter it and redistribute it
00011 **  freely, subject to the following restrictions:
00012 **
00013 **  1. The origin of this software must not be misrepresented; you must not
00014 **     claim that you wrote the original software. If you use this software
00015 **     in a product, an acknowledgment in the product documentation would be
00016 **     appreciated but is not required.
00017 **  2. Altered source versions must be plainly marked as such, and must not be
00018 **     misrepresented as being the original software.
00019 **  3. This notice may not be removed or altered from any source distribution.
00020 **
00021 **  Note: Some of the libraries ClanLib may link to may have additional
00022 **  requirements or restrictions.
00023 **
00024 **  File Author(s):
00025 **
00026 **    Magnus Norddahl
00027 **    Harry Storbacka
00028 **    Mark Page
00029 */
00030 
00033 
00034 #pragma once
00035 
00036 #include "../api_display.h"
00037 #include "../../Core/Text/string_types.h"
00038 #include <vector>
00039 
00040 class CL_PixelFormat;
00041 class CL_Colord;
00042 class CL_Colorf;
00043 
00047 class CL_API_DISPLAY CL_Color
00048 {
00051 
00052 public:
00055         CL_Color() : color(0) { return; }
00056 
00057         explicit CL_Color(const CL_Colord&);
00058         explicit CL_Color(const CL_Colorf&);
00059 
00069         CL_Color(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha = 255)
00070                 : color((alpha<<24) | (red<<16) | (green<<8) | blue) { return; }
00071 
00078         CL_Color(const CL_StringRef &hexstr);
00079 
00083 
00084 public:
00086         unsigned int get_alpha() const { return (color >> 24) & 0xff; }
00087 
00089         unsigned int get_red() const { return (color >> 16) & 0xff; }
00090 
00092         unsigned int get_green() const { return (color >> 8) & 0xff; }
00093 
00095         unsigned int get_blue() const { return color & 0xff; }
00096 
00098         double get_alpha_d() const { return float(get_alpha()) / 255.0; }
00099 
00101         double get_red_d() const { return float(get_red()) / 255.0; }
00102 
00104         double get_green_d() const { return float(get_green()) / 255.0; }
00105 
00107         double get_blue_d() const { return float(get_blue()) / 255.0; }
00108 
00110         float get_alpha_f() const { return float(get_alpha()) / 255.0f; }
00111 
00113         float get_red_f() const { return float(get_red()) / 255.0f; }
00114 
00116         float get_green_f() const { return float(get_green()) / 255.0f; }
00117 
00119         float get_blue_f() const { return float(get_blue()) / 255.0f; }
00120 
00122         unsigned int color;
00123 
00124 // Operations:
00125 public:
00127         bool operator==(const CL_Color &c) const
00128         { return (color == c.color); }
00129 
00131         bool operator!=(const CL_Color &c) const
00132         { return (color != c.color); }
00133 
00137 
00138 public:
00140         static CL_Color aliceblue;
00141 
00143         static CL_Color antiquewhite;
00144 
00146         static CL_Color aqua;
00147 
00149         static CL_Color aquamarine;
00150 
00152         static CL_Color azure;
00153 
00155         static CL_Color beige;
00156 
00158         static CL_Color bisque;
00159 
00161         static CL_Color black;
00162 
00164         static CL_Color blanchedalmond;
00165 
00167         static CL_Color blue;
00168 
00170         static CL_Color blueviolet;
00171 
00173         static CL_Color brown;
00174 
00176         static CL_Color burlywood;
00177 
00179         static CL_Color cadetblue;
00180 
00182         static CL_Color chartreuse;
00183 
00185         static CL_Color chocolate;
00186 
00188         static CL_Color coral;
00189 
00191         static CL_Color cornflowerblue;
00192 
00194         static CL_Color cornsilk;
00195 
00197         static CL_Color crimson;
00198 
00200         static CL_Color cyan;
00201 
00203         static CL_Color darkblue;
00204 
00206         static CL_Color darkcyan;
00207 
00209         static CL_Color darkgoldenrod;
00210 
00212         static CL_Color darkgray;
00213 
00215         static CL_Color darkgreen;
00216 
00218         static CL_Color darkgrey;
00219 
00221         static CL_Color darkkhaki;
00222 
00224         static CL_Color darkmagenta;
00225 
00227         static CL_Color darkolivegreen;
00228 
00230         static CL_Color darkorange;
00231 
00233         static CL_Color darkorchid;
00234 
00236         static CL_Color darkred;
00237 
00239         static CL_Color darksalmon;
00240 
00242         static CL_Color darkseagreen;
00243 
00245         static CL_Color darkslateblue;
00246 
00248         static CL_Color darkslategray;
00249 
00251         static CL_Color darkslategrey;
00252 
00254         static CL_Color darkturquoise;
00255 
00257         static CL_Color darkviolet;
00258 
00260         static CL_Color deeppink;
00261 
00263         static CL_Color deepskyblue;
00264 
00266         static CL_Color dimgray;
00267 
00269         static CL_Color dimgrey;
00270 
00272         static CL_Color dodgerblue;
00273 
00275         static CL_Color firebrick;
00276 
00278         static CL_Color floralwhite;
00279 
00281         static CL_Color forestgreen;
00282 
00284         static CL_Color fuchsia;
00285 
00287         static CL_Color gainsboro;
00288 
00290         static CL_Color ghostwhite;
00291 
00293         static CL_Color gold;
00294 
00296         static CL_Color goldenrod;
00297 
00299         static CL_Color gray;
00300 
00302         static CL_Color grey;
00303 
00305         static CL_Color green;
00306 
00308         static CL_Color greenyellow;
00309 
00311         static CL_Color honeydew;
00312 
00314         static CL_Color hotpink;
00315 
00317         static CL_Color indianred;
00318 
00320         static CL_Color indigo;
00321 
00323         static CL_Color ivory;
00324 
00326         static CL_Color khaki;
00327 
00329         static CL_Color lavender;
00330 
00332         static CL_Color lavenderblush;
00333 
00335         static CL_Color lawngreen;
00336 
00338         static CL_Color lemonchiffon;
00339 
00341         static CL_Color lightblue;
00342 
00344         static CL_Color lightcoral;
00345 
00347         static CL_Color lightcyan;
00348 
00350         static CL_Color lightgoldenrodyellow;
00351 
00353         static CL_Color lightgray;
00354 
00356         static CL_Color lightgreen;
00357 
00359         static CL_Color lightgrey;
00360 
00362         static CL_Color lightpink;
00363 
00365         static CL_Color lightsalmon;
00366 
00368         static CL_Color lightseagreen;
00369 
00371         static CL_Color lightskyblue;
00372 
00374         static CL_Color lightslategray;
00375 
00377         static CL_Color lightslategrey;
00378 
00380         static CL_Color lightsteelblue;
00381 
00383         static CL_Color lightyellow;
00384 
00386         static CL_Color lime;
00387 
00389         static CL_Color limegreen;
00390 
00392         static CL_Color linen;
00393 
00395         static CL_Color magenta;
00396 
00398         static CL_Color maroon;
00399 
00401         static CL_Color mediumaquamarine;
00402 
00404         static CL_Color mediumblue;
00405 
00407         static CL_Color mediumorchid;
00408 
00410         static CL_Color mediumpurple;
00411 
00413         static CL_Color mediumseagreen;
00414 
00416         static CL_Color mediumslateblue;
00417 
00419         static CL_Color mediumspringgreen;
00420 
00422         static CL_Color mediumturquoise;
00423 
00425         static CL_Color mediumvioletred;
00426 
00428         static CL_Color midnightblue;
00429 
00431         static CL_Color mintcream;
00432 
00434         static CL_Color mistyrose;
00435 
00437         static CL_Color moccasin;
00438 
00440         static CL_Color navajowhite;
00441 
00443         static CL_Color navy;
00444 
00446         static CL_Color oldlace;
00447 
00449         static CL_Color olive;
00450 
00452         static CL_Color olivedrab;
00453 
00455         static CL_Color orange;
00456 
00458         static CL_Color orangered;
00459 
00461         static CL_Color orchid;
00462 
00464         static CL_Color palegoldenrod;
00465 
00467         static CL_Color palegreen;
00468 
00470         static CL_Color paleturquoise;
00471 
00473         static CL_Color palevioletred;
00474 
00476         static CL_Color papayawhip;
00477 
00479         static CL_Color peachpuff;
00480 
00482         static CL_Color peru;
00483 
00485         static CL_Color pink;
00486 
00488         static CL_Color plum;
00489 
00491         static CL_Color powderblue;
00492 
00494         static CL_Color purple;
00495 
00497         static CL_Color red;
00498 
00500         static CL_Color rosybrown;
00501 
00503         static CL_Color royalblue;
00504 
00506         static CL_Color saddlebrown;
00507 
00509         static CL_Color salmon;
00510 
00512         static CL_Color sandybrown;
00513 
00515         static CL_Color seagreen;
00516 
00518         static CL_Color seashell;
00519 
00521         static CL_Color sienna;
00522 
00524         static CL_Color silver;
00525 
00527         static CL_Color skyblue;
00528 
00530         static CL_Color slateblue;
00531 
00533         static CL_Color slategray;
00534 
00536         static CL_Color slategrey;
00537 
00539         static CL_Color snow;
00540 
00542         static CL_Color springgreen;
00543 
00545         static CL_Color steelblue;
00546 
00548         static CL_Color tan;
00549 
00551         static CL_Color teal;
00552 
00554         static CL_Color thistle;
00555 
00557         static CL_Color tomato;
00558 
00560         static CL_Color turquoise;
00561 
00563         static CL_Color violet;
00564 
00566         static CL_Color wheat;
00567 
00569         static CL_Color white;
00570 
00572         static CL_Color whitesmoke;
00573 
00575         static CL_Color yellow;
00576 
00578         static CL_Color yellowgreen;
00579 
00581         static CL_Color transparent;
00582 
00583         static CL_Color gray10;
00584         static CL_Color gray20;
00585         static CL_Color gray30;
00586         static CL_Color gray40;
00587         static CL_Color gray50;
00588         static CL_Color gray60;
00589         static CL_Color gray70;
00590         static CL_Color gray80;
00591         static CL_Color gray90;
00592 
00598         static CL_Color find_color(const CL_StringRef &name);
00599 
00601         static std::vector<CL_String8> &get_names();
00602 
00606 
00607 public:
00609         void set_alpha(unsigned int value) { color = (color & 0x00ffffff) | (value << 24); }
00610 
00612         void set_red(unsigned int value) { color = (color & 0xff00ffff) | (value << 16); }
00613 
00615         void set_green(unsigned int value) { color = (color & 0xffff00ff) | (value << 8); }
00616 
00618         void set_blue(unsigned int value) { color = (color & 0xffffff00) | value; }
00619 
00621         void set_alpha_d(float value) { set_alpha((unsigned int) (value*255)); }
00622 
00624         void set_red_d(float value) { set_red((unsigned int) (value*255)); }
00625 
00627         void set_green_d(float value) { set_green((unsigned int) (value*255)); }
00628 
00630         void set_blue_d(float value) { set_blue((unsigned int) (value*255)); }
00631 
00633         void set_color(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha = 255)
00634         { color = (alpha<<24) | (red<<16) | (green<<8) | blue; }
00635 
00637         void set_color_d(float red, float green, float blue, float alpha = 1.0)
00638         {
00639                 color =
00640                         (((unsigned int) (alpha*255))<<24) |
00641                         (((unsigned int) (red*255))<<16) |
00642                         (((unsigned int) (green*255))<<8) |
00643                         ((unsigned int) (blue*255));
00644         }
00645 
00647         unsigned int to_pixelformat(const CL_PixelFormat &pf) const;
00648 
00650         static CL_Color from_pixelformat(unsigned int raw_color, const CL_PixelFormat &pf);
00652 };
00653 
00657 class CL_Colord
00658 {
00661 
00662 public:
00663 
00665         CL_Colord() : r(0.0), g(0.0), b(0.0), a(0.0)
00666         {
00667         }
00668 
00678         CL_Colord(double r, double g, double b, double a = 1.0)
00679                 : r(r), g(g), b(b), a(a)
00680         {
00681         }
00682 
00692         CL_Colord(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
00693                 : r(r/255.0),
00694                   g(g/255.0),
00695                   b(b/255.0),
00696                   a(a/255.0)
00697         {
00698         }
00699 
00700         explicit CL_Colord(const CL_Color& color)
00701                 : r(color.get_red()/255.0),
00702                   g(color.get_green()/255.0),
00703                   b(color.get_blue()/255.0),
00704                   a(color.get_alpha()/255.0)
00705         {
00706         }
00707 
00714         CL_Colord(const CL_StringRef &hexstr)
00715         {
00716                 *this = (CL_Colord)CL_Color::find_color(hexstr);
00717         }
00718 
00722 
00723 public:
00724         double r, g, b, a;
00725 
00729         double get_red() const { return r; }
00730 
00734         double get_green() const { return g; }
00735 
00739         double get_blue() const { return b; }
00740 
00744         double get_alpha() const { return a; }
00745 
00749 
00750 public:
00752         void normalize()
00753         {
00754                 r = (r < 0.0) ? 0.0 : ((r > 1.0) ? 1.0 : r);
00755                 g = (g < 0.0) ? 0.0 : ((g > 1.0) ? 1.0 : g);
00756                 b = (b < 0.0) ? 0.0 : ((b > 1.0) ? 1.0 : b);
00757                 a = (a < 0.0) ? 0.0 : ((a > 1.0) ? 1.0 : a);
00758         }
00759 
00761         void set_alpha(double value) { a = value; }
00762 
00764         void set_red(double value) {  r = value; }
00765 
00767         void set_green(double value) { g= value; }
00768 
00770         void set_blue(double value) { b = value; }
00771 
00773         bool operator==(const CL_Colord &c) const
00774         {
00775                 return (r == c.r) && (g == c.g) && (b == c.b) && (a == c.a);
00776         }
00777 
00779         bool operator!=(const CL_Colord &c) const
00780         {
00781                 return (r != c.r) || (g != c.g) || (b != c.b) || (a != c.a);
00782         }
00783 
00785         operator CL_Color() const
00786         {
00787                 return CL_Color(*this);
00788         }
00789 
00793 
00794 public:
00796         static CL_Colord aliceblue;
00797 
00799         static CL_Colord antiquewhite;
00800 
00802         static CL_Colord aqua;
00803 
00805         static CL_Colord aquamarine;
00806 
00808         static CL_Colord azure;
00809 
00811         static CL_Colord beige;
00812 
00814         static CL_Colord bisque;
00815 
00817         static CL_Colord black;
00818 
00820         static CL_Colord blanchedalmond;
00821 
00823         static CL_Colord blue;
00824 
00826         static CL_Colord blueviolet;
00827 
00829         static CL_Colord brown;
00830 
00832         static CL_Colord burlywood;
00833 
00835         static CL_Colord cadetblue;
00836 
00838         static CL_Colord chartreuse;
00839 
00841         static CL_Colord chocolate;
00842 
00844         static CL_Colord coral;
00845 
00847         static CL_Colord cornflowerblue;
00848 
00850         static CL_Colord cornsilk;
00851 
00853         static CL_Colord crimson;
00854 
00856         static CL_Colord cyan;
00857 
00859         static CL_Colord darkblue;
00860 
00862         static CL_Colord darkcyan;
00863 
00865         static CL_Colord darkgoldenrod;
00866 
00868         static CL_Colord darkgray;
00869 
00871         static CL_Colord darkgreen;
00872 
00874         static CL_Colord darkgrey;
00875 
00877         static CL_Colord darkkhaki;
00878 
00880         static CL_Colord darkmagenta;
00881 
00883         static CL_Colord darkolivegreen;
00884 
00886         static CL_Colord darkorange;
00887 
00889         static CL_Colord darkorchid;
00890 
00892         static CL_Colord darkred;
00893 
00895         static CL_Colord darksalmon;
00896 
00898         static CL_Colord darkseagreen;
00899 
00901         static CL_Colord darkslateblue;
00902 
00904         static CL_Colord darkslategray;
00905 
00907         static CL_Colord darkslategrey;
00908 
00910         static CL_Colord darkturquoise;
00911 
00913         static CL_Colord darkviolet;
00914 
00916         static CL_Colord deeppink;
00917 
00919         static CL_Colord deepskyblue;
00920 
00922         static CL_Colord dimgray;
00923 
00925         static CL_Colord dimgrey;
00926 
00928         static CL_Colord dodgerblue;
00929 
00931         static CL_Colord firebrick;
00932 
00934         static CL_Colord floralwhite;
00935 
00937         static CL_Colord forestgreen;
00938 
00940         static CL_Colord fuchsia;
00941 
00943         static CL_Colord gainsboro;
00944 
00946         static CL_Colord ghostwhite;
00947 
00949         static CL_Colord gold;
00950 
00952         static CL_Colord goldenrod;
00953 
00955         static CL_Colord gray;
00956 
00958         static CL_Colord grey;
00959 
00961         static CL_Colord green;
00962 
00964         static CL_Colord greenyellow;
00965 
00967         static CL_Colord honeydew;
00968 
00970         static CL_Colord hotpink;
00971 
00973         static CL_Colord indianred;
00974 
00976         static CL_Colord indigo;
00977 
00979         static CL_Colord ivory;
00980 
00982         static CL_Colord khaki;
00983 
00985         static CL_Colord lavender;
00986 
00988         static CL_Colord lavenderblush;
00989 
00991         static CL_Colord lawngreen;
00992 
00994         static CL_Colord lemonchiffon;
00995 
00997         static CL_Colord lightblue;
00998 
01000         static CL_Colord lightcoral;
01001 
01003         static CL_Colord lightcyan;
01004 
01006         static CL_Colord lightgoldenrodyellow;
01007 
01009         static CL_Colord lightgray;
01010 
01012         static CL_Colord lightgreen;
01013 
01015         static CL_Colord lightgrey;
01016 
01018         static CL_Colord lightpink;
01019 
01021         static CL_Colord lightsalmon;
01022 
01024         static CL_Colord lightseagreen;
01025 
01027         static CL_Colord lightskyblue;
01028 
01030         static CL_Colord lightslategray;
01031 
01033         static CL_Colord lightslategrey;
01034 
01036         static CL_Colord lightsteelblue;
01037 
01039         static CL_Colord lightyellow;
01040 
01042         static CL_Colord lime;
01043 
01045         static CL_Colord limegreen;
01046 
01048         static CL_Colord linen;
01049 
01051         static CL_Colord magenta;
01052 
01054         static CL_Colord maroon;
01055 
01057         static CL_Colord mediumaquamarine;
01058 
01060         static CL_Colord mediumblue;
01061 
01063         static CL_Colord mediumorchid;
01064 
01066         static CL_Colord mediumpurple;
01067 
01069         static CL_Colord mediumseagreen;
01070 
01072         static CL_Colord mediumslateblue;
01073 
01075         static CL_Colord mediumspringgreen;
01076 
01078         static CL_Colord mediumturquoise;
01079 
01081         static CL_Colord mediumvioletred;
01082 
01084         static CL_Colord midnightblue;
01085 
01087         static CL_Colord mintcream;
01088 
01090         static CL_Colord mistyrose;
01091 
01093         static CL_Colord moccasin;
01094 
01096         static CL_Colord navajowhite;
01097 
01099         static CL_Colord navy;
01100 
01102         static CL_Colord oldlace;
01103 
01105         static CL_Colord olive;
01106 
01108         static CL_Colord olivedrab;
01109 
01111         static CL_Colord orange;
01112 
01114         static CL_Colord orangered;
01115 
01117         static CL_Colord orchid;
01118 
01120         static CL_Colord palegoldenrod;
01121 
01123         static CL_Colord palegreen;
01124 
01126         static CL_Colord paleturquoise;
01127 
01129         static CL_Colord palevioletred;
01130 
01132         static CL_Colord papayawhip;
01133 
01135         static CL_Colord peachpuff;
01136 
01138         static CL_Colord peru;
01139 
01141         static CL_Colord pink;
01142 
01144         static CL_Colord plum;
01145 
01147         static CL_Colord powderblue;
01148 
01150         static CL_Colord purple;
01151 
01153         static CL_Colord red;
01154 
01156         static CL_Colord rosybrown;
01157 
01159         static CL_Colord royalblue;
01160 
01162         static CL_Colord saddlebrown;
01163 
01165         static CL_Colord salmon;
01166 
01168         static CL_Colord sandybrown;
01169 
01171         static CL_Colord seagreen;
01172 
01174         static CL_Colord seashell;
01175 
01177         static CL_Colord sienna;
01178 
01180         static CL_Colord silver;
01181 
01183         static CL_Colord skyblue;
01184 
01186         static CL_Colord slateblue;
01187 
01189         static CL_Colord slategray;
01190 
01192         static CL_Colord slategrey;
01193 
01195         static CL_Colord snow;
01196 
01198         static CL_Colord springgreen;
01199 
01201         static CL_Colord steelblue;
01202 
01204         static CL_Colord tan;
01205 
01207         static CL_Colord teal;
01208 
01210         static CL_Colord thistle;
01211 
01213         static CL_Colord tomato;
01214 
01216         static CL_Colord turquoise;
01217 
01219         static CL_Colord violet;
01220 
01222         static CL_Colord wheat;
01223 
01225         static CL_Colord white;
01226 
01228         static CL_Colord whitesmoke;
01229 
01231         static CL_Colord yellow;
01232 
01234         static CL_Colord yellowgreen;
01235 
01237         static CL_Colord transparent;
01238 
01239         static CL_Colord gray10;
01240         static CL_Colord gray20;
01241         static CL_Colord gray30;
01242         static CL_Colord gray40;
01243         static CL_Colord gray50;
01244         static CL_Colord gray60;
01245         static CL_Colord gray70;
01246         static CL_Colord gray80;
01247         static CL_Colord gray90;
01249 };
01250 
01254 class CL_Colorf
01255 {
01258 
01259 public:
01261         CL_Colorf() : r(0.0f), g(0.0f), b(0.0f), a(0.0f)
01262         {
01263         }
01264 
01274         CL_Colorf(float r, float g, float b, float a = 1.0f)
01275                 : r(r), g(g), b(b), a(a)
01276         {
01277         }
01278 
01288         CL_Colorf(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
01289                 : r(r/255.0f),
01290                   g(g/255.0f),
01291                   b(b/255.0f),
01292                   a(a/255.0f)
01293         {
01294         }
01295 
01296         explicit CL_Colorf(const CL_Color& color)
01297                 : r(color.get_red()/255.0f),
01298                   g(color.get_green()/255.0f),
01299                   b(color.get_blue()/255.0f),
01300                   a(color.get_alpha()/255.0f)
01301         {
01302         }
01303 
01310         CL_Colorf(const CL_StringRef &hexstr)
01311         {
01312                 *this = (CL_Colorf)CL_Color::find_color(hexstr);
01313         }
01314 
01318 
01319 public:
01320         float r, g, b, a;
01321 
01325         float get_red() const { return r; }
01326 
01330         float get_green() const { return g; }
01331 
01335         float get_blue() const { return b; }
01336 
01340         float get_alpha() const { return a; }
01341 
01345 
01346 public:
01348         void normalize()
01349         {
01350                 r = (r < 0.0f) ? 0.0f : ((r > 1.0f) ? 1.0f : r);
01351                 g = (g < 0.0f) ? 0.0f : ((g > 1.0f) ? 1.0f : g);
01352                 b = (b < 0.0f) ? 0.0f : ((b > 1.0f) ? 1.0f : b);
01353                 a = (a < 0.0f) ? 0.0f : ((a > 1.0f) ? 1.0f : a);
01354         }
01355 
01357         void set_alpha(float value) { a = value; }
01358 
01360         void set_red(float value) {  r = value; }
01361 
01363         void set_green(float value) { g= value; }
01364 
01366         void set_blue(float value) { b = value; }
01367 
01369         bool operator==(const CL_Colorf &c) const
01370         {
01371                 return (r == c.r) && (g == c.g) && (b == c.b) && (a == c.a);
01372         }
01373 
01375         bool operator!=(const CL_Colorf &c) const
01376         {
01377                 return (r != c.r) || (g != c.g) || (b != c.b) || (a != c.a);
01378         }
01379 
01381         operator CL_Color() const
01382         {
01383                 return CL_Color(*this);
01384         }
01385 
01389 
01390 public:
01392         static CL_Colorf aliceblue;
01393 
01395         static CL_Colorf antiquewhite;
01396 
01398         static CL_Colorf aqua;
01399 
01401         static CL_Colorf aquamarine;
01402 
01404         static CL_Colorf azure;
01405 
01407         static CL_Colorf beige;
01408 
01410         static CL_Colorf bisque;
01411 
01413         static CL_Colorf black;
01414 
01416         static CL_Colorf blanchedalmond;
01417 
01419         static CL_Colorf blue;
01420 
01422         static CL_Colorf blueviolet;
01423 
01425         static CL_Colorf brown;
01426 
01428         static CL_Colorf burlywood;
01429 
01431         static CL_Colorf cadetblue;
01432 
01434         static CL_Colorf chartreuse;
01435 
01437         static CL_Colorf chocolate;
01438 
01440         static CL_Colorf coral;
01441 
01443         static CL_Colorf cornflowerblue;
01444 
01446         static CL_Colorf cornsilk;
01447 
01449         static CL_Colorf crimson;
01450 
01452         static CL_Colorf cyan;
01453 
01455         static CL_Colorf darkblue;
01456 
01458         static CL_Colorf darkcyan;
01459 
01461         static CL_Colorf darkgoldenrod;
01462 
01464         static CL_Colorf darkgray;
01465 
01467         static CL_Colorf darkgreen;
01468 
01470         static CL_Colorf darkgrey;
01471 
01473         static CL_Colorf darkkhaki;
01474 
01476         static CL_Colorf darkmagenta;
01477 
01479         static CL_Colorf darkolivegreen;
01480 
01482         static CL_Colorf darkorange;
01483 
01485         static CL_Colorf darkorchid;
01486 
01488         static CL_Colorf darkred;
01489 
01491         static CL_Colorf darksalmon;
01492 
01494         static CL_Colorf darkseagreen;
01495 
01497         static CL_Colorf darkslateblue;
01498 
01500         static CL_Colorf darkslategray;
01501 
01503         static CL_Colorf darkslategrey;
01504 
01506         static CL_Colorf darkturquoise;
01507 
01509         static CL_Colorf darkviolet;
01510 
01512         static CL_Colorf deeppink;
01513 
01515         static CL_Colorf deepskyblue;
01516 
01518         static CL_Colorf dimgray;
01519 
01521         static CL_Colorf dimgrey;
01522 
01524         static CL_Colorf dodgerblue;
01525 
01527         static CL_Colorf firebrick;
01528 
01530         static CL_Colorf floralwhite;
01531 
01533         static CL_Colorf forestgreen;
01534 
01536         static CL_Colorf fuchsia;
01537 
01539         static CL_Colorf gainsboro;
01540 
01542         static CL_Colorf ghostwhite;
01543 
01545         static CL_Colorf gold;
01546 
01548         static CL_Colorf goldenrod;
01549 
01551         static CL_Colorf gray;
01552 
01554         static CL_Colorf grey;
01555 
01557         static CL_Colorf green;
01558 
01560         static CL_Colorf greenyellow;
01561 
01563         static CL_Colorf honeydew;
01564 
01566         static CL_Colorf hotpink;
01567 
01569         static CL_Colorf indianred;
01570 
01572         static CL_Colorf indigo;
01573 
01575         static CL_Colorf ivory;
01576 
01578         static CL_Colorf khaki;
01579 
01581         static CL_Colorf lavender;
01582 
01584         static CL_Colorf lavenderblush;
01585 
01587         static CL_Colorf lawngreen;
01588 
01590         static CL_Colorf lemonchiffon;
01591 
01593         static CL_Colorf lightblue;
01594 
01596         static CL_Colorf lightcoral;
01597 
01599         static CL_Colorf lightcyan;
01600 
01602         static CL_Colorf lightgoldenrodyellow;
01603 
01605         static CL_Colorf lightgray;
01606 
01608         static CL_Colorf lightgreen;
01609 
01611         static CL_Colorf lightgrey;
01612 
01614         static CL_Colorf lightpink;
01615 
01617         static CL_Colorf lightsalmon;
01618 
01620         static CL_Colorf lightseagreen;
01621 
01623         static CL_Colorf lightskyblue;
01624 
01626         static CL_Colorf lightslategray;
01627 
01629         static CL_Colorf lightslategrey;
01630 
01632         static CL_Colorf lightsteelblue;
01633 
01635         static CL_Colorf lightyellow;
01636 
01638         static CL_Colorf lime;
01639 
01641         static CL_Colorf limegreen;
01642 
01644         static CL_Colorf linen;
01645 
01647         static CL_Colorf magenta;
01648 
01650         static CL_Colorf maroon;
01651 
01653         static CL_Colorf mediumaquamarine;
01654 
01656         static CL_Colorf mediumblue;
01657 
01659         static CL_Colorf mediumorchid;
01660 
01662         static CL_Colorf mediumpurple;
01663 
01665         static CL_Colorf mediumseagreen;
01666 
01668         static CL_Colorf mediumslateblue;
01669 
01671         static CL_Colorf mediumspringgreen;
01672 
01674         static CL_Colorf mediumturquoise;
01675 
01677         static CL_Colorf mediumvioletred;
01678 
01680         static CL_Colorf midnightblue;
01681 
01683         static CL_Colorf mintcream;
01684 
01686         static CL_Colorf mistyrose;
01687 
01689         static CL_Colorf moccasin;
01690 
01692         static CL_Colorf navajowhite;
01693 
01695         static CL_Colorf navy;
01696 
01698         static CL_Colorf oldlace;
01699 
01701         static CL_Colorf olive;
01702 
01704         static CL_Colorf olivedrab;
01705 
01707         static CL_Colorf orange;
01708 
01710         static CL_Colorf orangered;
01711 
01713         static CL_Colorf orchid;
01714 
01716         static CL_Colorf palegoldenrod;
01717 
01719         static CL_Colorf palegreen;
01720 
01722         static CL_Colorf paleturquoise;
01723 
01725         static CL_Colorf palevioletred;
01726 
01728         static CL_Colorf papayawhip;
01729 
01731         static CL_Colorf peachpuff;
01732 
01734         static CL_Colorf peru;
01735 
01737         static CL_Colorf pink;
01738 
01740         static CL_Colorf plum;
01741 
01743         static CL_Colorf powderblue;
01744 
01746         static CL_Colorf purple;
01747 
01749         static CL_Colorf red;
01750 
01752         static CL_Colorf rosybrown;
01753 
01755         static CL_Colorf royalblue;
01756 
01758         static CL_Colorf saddlebrown;
01759 
01761         static CL_Colorf salmon;
01762 
01764         static CL_Colorf sandybrown;
01765 
01767         static CL_Colorf seagreen;
01768 
01770         static CL_Colorf seashell;
01771 
01773         static CL_Colorf sienna;
01774 
01776         static CL_Colorf silver;
01777 
01779         static CL_Colorf skyblue;
01780 
01782         static CL_Colorf slateblue;
01783 
01785         static CL_Colorf slategray;
01786 
01788         static CL_Colorf slategrey;
01789 
01791         static CL_Colorf snow;
01792 
01794         static CL_Colorf springgreen;
01795 
01797         static CL_Colorf steelblue;
01798 
01800         static CL_Colorf tan;
01801 
01803         static CL_Colorf teal;
01804 
01806         static CL_Colorf thistle;
01807 
01809         static CL_Colorf tomato;
01810 
01812         static CL_Colorf turquoise;
01813 
01815         static CL_Colorf violet;
01816 
01818         static CL_Colorf wheat;
01819 
01821         static CL_Colorf white;
01822 
01824         static CL_Colorf whitesmoke;
01825 
01827         static CL_Colorf yellow;
01828 
01830         static CL_Colorf yellowgreen;
01831 
01833         static CL_Colorf transparent;
01834 
01835         static CL_Colorf gray10;
01836         static CL_Colorf gray20;
01837         static CL_Colorf gray30;
01838         static CL_Colorf gray40;
01839         static CL_Colorf gray50;
01840         static CL_Colorf gray60;
01841         static CL_Colorf gray70;
01842         static CL_Colorf gray80;
01843         static CL_Colorf gray90;
01845 };
01846 

Generated on Thu Dec 3 02:39:28 2009 for ClanLib by  doxygen 1.4.6