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

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

Issue 2714633003: Adds more metadata to the about:webapks page (Closed)
Patch Set: Adds more metadata to the about:webapks page Created 3 years, 9 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 | « chrome/browser/ui/webui/webapks_handler.cc ('k') | ui/gfx/color_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UTILS_H_ 5 #ifndef UI_GFX_COLOR_UTILS_H_
6 #define UI_GFX_COLOR_UTILS_H_ 6 #define UI_GFX_COLOR_UTILS_H_
7 7
8 #include <string>
9
8 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
9 #include "ui/gfx/gfx_export.h" 11 #include "ui/gfx/gfx_export.h"
10 12
11 class SkBitmap; 13 class SkBitmap;
12 14
13 namespace color_utils { 15 namespace color_utils {
14 16
15 // Represents an HSL color. 17 // Represents an HSL color.
16 struct HSL { 18 struct HSL {
17 double h; 19 double h;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 133
132 // Returns true only if Chrome should use an inverted color scheme - which is 134 // Returns true only if Chrome should use an inverted color scheme - which is
133 // only true if the system has high-contrast mode enabled and and is using a 135 // only true if the system has high-contrast mode enabled and and is using a
134 // light-on-dark color scheme. 136 // light-on-dark color scheme.
135 GFX_EXPORT bool IsInvertedColorScheme(); 137 GFX_EXPORT bool IsInvertedColorScheme();
136 138
137 // Derives a color for icons on a UI surface based on the text color on the same 139 // Derives a color for icons on a UI surface based on the text color on the same
138 // surface. 140 // surface.
139 GFX_EXPORT SkColor DeriveDefaultIconColor(SkColor text_color); 141 GFX_EXPORT SkColor DeriveDefaultIconColor(SkColor text_color);
140 142
143 // Creates an rgba string for an SkColor. For example: 'rgba(255,0,255,0.5)'.
144 GFX_EXPORT std::string SkColorToRgbaString(SkColor color);
145
146 // Creates an rgb string for an SkColor. For example: '255,0,255'.
147 GFX_EXPORT std::string SkColorToRgbString(SkColor color);
148
141 } // namespace color_utils 149 } // namespace color_utils
142 150
143 #endif // UI_GFX_COLOR_UTILS_H_ 151 #endif // UI_GFX_COLOR_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/webapks_handler.cc ('k') | ui/gfx/color_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698