Home | History | Annotate | Download | only in utils
      1 /*
      2  * Copyright (C) 2015 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 #ifndef COLOR_H
     17 #define COLOR_H
     18 
     19 #include <SkColor.h>
     20 
     21 namespace android {
     22 namespace uirenderer {
     23     namespace Color {
     24         enum Color {
     25             Red_500 = 0xFFF44336,
     26             Pink_500 = 0xFFE91E63,
     27             Purple_500 = 0xFF9C27B0,
     28             DeepPurple_500 = 0xFF673AB7,
     29             Indigo_500 = 0xFF3F51B5,
     30             Blue_500 = 0xFF2196F3,
     31             LightBlue_300 = 0xFF4FC3F7,
     32             LightBlue_500 = 0xFF03A9F4,
     33             Cyan_500 = 0xFF00BCD4,
     34             Teal_500 = 0xFF009688,
     35             Teal_700 = 0xFF00796B,
     36             Green_500 = 0xFF4CAF50,
     37             Green_700 = 0xFF388E3C,
     38             LightGreen_500 = 0xFF8BC34A,
     39             LightGreen_700 = 0xFF689F38,
     40             Lime_500 = 0xFFCDDC39,
     41             Yellow_500 = 0xFFFFEB3B,
     42             Amber_500 = 0xFFFFC107,
     43             Orange_500 = 0xFFFF9800,
     44             DeepOrange_500 = 0xFFFF5722,
     45             Brown_500 = 0xFF795548,
     46             Grey_200 = 0xFFEEEEEE,
     47             Grey_500 = 0xFF9E9E9E,
     48             Grey_700 = 0xFF616161,
     49             BlueGrey_500 = 0xFF607D8B,
     50             Transparent = 0x00000000,
     51             Black = 0xFF000000,
     52             White = 0xFFFFFFFF,
     53         };
     54     }
     55 
     56     static_assert(Color::White == SK_ColorWHITE, "color format has changed");
     57     static_assert(Color::Black == SK_ColorBLACK, "color format has changed");
     58 
     59     // Array of bright (500 intensity) colors for synthetic content
     60     static const Color::Color BrightColors[] = {
     61         Color::Red_500,
     62         Color::Pink_500,
     63         Color::Purple_500,
     64         Color::DeepPurple_500,
     65         Color::Indigo_500,
     66         Color::Blue_500,
     67         Color::LightBlue_500,
     68         Color::Cyan_500,
     69         Color::Teal_500,
     70         Color::Green_500,
     71         Color::LightGreen_500,
     72         Color::Lime_500,
     73         Color::Yellow_500,
     74         Color::Amber_500,
     75         Color::Orange_500,
     76         Color::DeepOrange_500,
     77         Color::Brown_500,
     78         Color::Grey_500,
     79         Color::BlueGrey_500,
     80     };
     81     static constexpr int BrightColorsCount = sizeof(BrightColors) / sizeof(Color::Color);
     82 
     83 } /* namespace uirenderer */
     84 } /* namespace android */
     85 
     86 #endif /* TEST_UTILS_H */
     87