Otclient  14/8/2020
color.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2020 OTClient <https://github.com/edubart/otclient>
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20  * THE SOFTWARE.
21  */
22 
23 #include "color.h"
24 
25 // NOTE: AABBGGRR order
26 const Color Color::alpha = 0x00000000U;
27 const Color Color::white = 0xffffffff;
28 const Color Color::black = 0xff000000;
29 const Color Color::red = 0xff0000ff;
30 const Color Color::darkRed = 0xff000080;
31 const Color Color::green = 0xff00ff00;
32 const Color Color::darkGreen = 0xff008000;
33 const Color Color::blue = 0xffff0000;
34 const Color Color::darkBlue = 0xff800000;
35 const Color Color::pink = 0xffff00ff;
36 const Color Color::darkPink = 0xff800080;
37 const Color Color::yellow = 0xff00ffff;
38 const Color Color::darkYellow = 0xff008080;
39 const Color Color::teal = 0xffffff00;
40 const Color Color::darkTeal = 0xff808000;
41 const Color Color::gray = 0xffa0a0a0;
42 const Color Color::darkGray = 0xff808080;
43 const Color Color::lightGray = 0xffc0c0c0;
44 const Color Color::orange = 0xff008cff;
45 
46 Color::Color(const std::string& coltext)
47 {
48  std::stringstream ss(coltext);
49  ss >> *this;
50 }
Color
Definition: color.h:32
Color::lightGray
static const Color lightGray
Definition: color.h:117
Color::gray
static const Color gray
Definition: color.h:115
Color::darkRed
static const Color darkRed
Definition: color.h:104
Color::green
static const Color green
Definition: color.h:105
Color::orange
static const Color orange
Definition: color.h:118
Color::darkPink
static const Color darkPink
Definition: color.h:110
Color::darkGreen
static const Color darkGreen
Definition: color.h:106
Color::white
static const Color white
Definition: color.h:101
Color::darkBlue
static const Color darkBlue
Definition: color.h:108
Color::Color
Color()
Definition: color.h:35
Color::darkGray
static const Color darkGray
Definition: color.h:116
Color::blue
static const Color blue
Definition: color.h:107
Color::black
static const Color black
Definition: color.h:102
Color::alpha
static const Color alpha
Definition: color.h:100
Color::darkYellow
static const Color darkYellow
Definition: color.h:112
Color::red
static const Color red
Definition: color.h:103
color.h
Color::pink
static const Color pink
Definition: color.h:109
Color::darkTeal
static const Color darkTeal
Definition: color.h:114
Color::teal
static const Color teal
Definition: color.h:113
Color::yellow
static const Color yellow
Definition: color.h:111