1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef RENDER_SERVICE_CLIENT_CORE_COMMON_RS_COLOR_PALETTE_H
17 #define RENDER_SERVICE_CLIENT_CORE_COMMON_RS_COLOR_PALETTE_H
18 
19 #include "common/rs_color.h"
20 #include "common/rs_macros.h"
21 
22 namespace OHOS {
23 namespace Rosen {
24 struct RgbPalette {
25     RgbPalette() = delete;
BlackRgbPalette26     static const RSColor& Black()
27     {
28         static RSColor val { 0, 0, 0 };
29         return val;
30     };
31 
BlueRgbPalette32     static const RSColor& Blue()
33     {
34         static RSColor val { 0, 0, 255 };
35         return val;
36     };
37 
CyanRgbPalette38     static const RSColor& Cyan()
39     {
40         static RSColor val { 0, 255, 255 };
41         return val;
42     };
43 
DarkGrayRgbPalette44     static const RSColor& DarkGray()
45     {
46         static RSColor val { 68, 68, 68 };
47         return val;
48     };
49 
GrayRgbPalette50     static const RSColor& Gray()
51     {
52         static RSColor val { 136, 136, 136 };
53         return val;
54     };
55 
GreenRgbPalette56     static const RSColor& Green()
57     {
58         static RSColor val { 0, 255, 0 };
59         return val;
60     };
61 
LightGrayRgbPalette62     static const RSColor& LightGray()
63     {
64         static RSColor val { 204, 204, 204 };
65         return val;
66     };
67 
MagentaRgbPalette68     static const RSColor& Magenta()
69     {
70         static RSColor val { 255, 0, 255 };
71         return val;
72     };
73 
RedRgbPalette74     static const RSColor& Red()
75     {
76         static RSColor val { 255, 0, 0 };
77         return val;
78     };
79 
TransparentRgbPalette80     static const RSColor& Transparent()
81     {
82         static RSColor val { 0, 0, 0, 0 };
83         return val;
84     };
85 
WhiteRgbPalette86     static const RSColor& White()
87     {
88         static RSColor val { 255, 255, 255 };
89         return val;
90     };
91 };
92 } // namespace Rosen
93 } // namespace OHOS
94 #endif // RENDER_SERVICE_CLIENT_CORE_COMMON_RS_COLOR_PALETTE_H
95