Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: ui/gfx/color_palette.h

Issue 1885183002: Allow constexpr, and use it in a few places. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add guidance Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « styleguide/c++/c++11.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_COLOR_PALETTE_H_ 5 #ifndef UI_GFX_COLOR_PALETTE_H_
6 #define UI_GFX_COLOR_PALETTE_H_ 6 #define UI_GFX_COLOR_PALETTE_H_
7 7
8 #include "third_party/skia/include/core/SkColor.h" 8 #include "third_party/skia/include/core/SkColor.h"
9 9
10 namespace gfx { 10 namespace gfx {
11 11
12 // A placeholder value for unset colors. This should never be visible and is red 12 // A placeholder value for unset colors. This should never be visible and is red
13 // as a visual flag for misbehaving code. 13 // as a visual flag for misbehaving code.
14 const SkColor kPlaceholderColor = SK_ColorRED; 14 constexpr SkColor kPlaceholderColor = SK_ColorRED;
15 15
16 const SkColor kChromeIconGrey = SkColorSetRGB(0x5A, 0x5A, 0x5A); 16 const SkColor kChromeIconGrey = SkColorSetRGB(0x5A, 0x5A, 0x5A);
17 17
18 // The number refers to the shade of darkness. Each color in the MD 18 // The number refers to the shade of darkness. Each color in the MD
19 // palette ranges from 100-900. 19 // palette ranges from 100-900.
20 const SkColor kGoogleBlue300 = SkColorSetRGB(0x7B, 0xAA, 0xF7); 20 const SkColor kGoogleBlue300 = SkColorSetRGB(0x7B, 0xAA, 0xF7);
21 const SkColor kGoogleBlue500 = SkColorSetRGB(0x42, 0x85, 0xF4); 21 const SkColor kGoogleBlue500 = SkColorSetRGB(0x42, 0x85, 0xF4);
22 const SkColor kGoogleBlue700 = SkColorSetRGB(0x33, 0x67, 0xD6); 22 const SkColor kGoogleBlue700 = SkColorSetRGB(0x33, 0x67, 0xD6);
23 const SkColor kGoogleRed300 = SkColorSetRGB(0xE6, 0x7C, 0x73); 23 const SkColor kGoogleRed300 = SkColorSetRGB(0xE6, 0x7C, 0x73);
24 const SkColor kGoogleRed700 = SkColorSetRGB(0xC5, 0x39, 0x29); 24 const SkColor kGoogleRed700 = SkColorSetRGB(0xC5, 0x39, 0x29);
25 const SkColor kGoogleGreen300 = SkColorSetRGB(0x57, 0xBB, 0x8A); 25 const SkColor kGoogleGreen300 = SkColorSetRGB(0x57, 0xBB, 0x8A);
26 const SkColor kGoogleGreen700 = SkColorSetRGB(0x0B, 0x80, 0x43); 26 const SkColor kGoogleGreen700 = SkColorSetRGB(0x0B, 0x80, 0x43);
27 const SkColor kGoogleYellow300 = SkColorSetRGB(0xF7, 0xCB, 0x4D); 27 const SkColor kGoogleYellow300 = SkColorSetRGB(0xF7, 0xCB, 0x4D);
28 const SkColor kGoogleYellow700 = SkColorSetRGB(0xF0, 0x93, 0x00); 28 const SkColor kGoogleYellow700 = SkColorSetRGB(0xF0, 0x93, 0x00);
29 29
30 // Material Design canonical colors, from 30 // Material Design canonical colors, from
31 // https://www.google.com/design/spec/style/color.html#color-color-palette 31 // https://www.google.com/design/spec/style/color.html#color-color-palette
32 const SkColor kMaterialBlue300 = SkColorSetRGB(0x64, 0xB5, 0xF6); 32 const SkColor kMaterialBlue300 = SkColorSetRGB(0x64, 0xB5, 0xF6);
33 const SkColor kMaterialBlue500 = SkColorSetRGB(0x21, 0x96, 0xF3); 33 const SkColor kMaterialBlue500 = SkColorSetRGB(0x21, 0x96, 0xF3);
34 const SkColor kMaterialBlue700 = SkColorSetRGB(0x19, 0x76, 0xD2); 34 const SkColor kMaterialBlue700 = SkColorSetRGB(0x19, 0x76, 0xD2);
35 35
36 const SkColor kMaterialGrey300 = SkColorSetRGB(0xE0, 0xE0, 0xE0); 36 const SkColor kMaterialGrey300 = SkColorSetRGB(0xE0, 0xE0, 0xE0);
37 const SkColor kMaterialGrey500 = SkColorSetRGB(0x9E, 0x9E, 0x9E); 37 const SkColor kMaterialGrey500 = SkColorSetRGB(0x9E, 0x9E, 0x9E);
38 38
39 } // namespace gfx 39 } // namespace gfx
40 40
41 #endif // UI_GFX_COLOR_PALETTE_H_ 41 #endif // UI_GFX_COLOR_PALETTE_H_
OLDNEW
« no previous file with comments | « styleguide/c++/c++11.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698