Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_COLOR_UTILS_H_ | |
| 6 #define CHROME_BROWSER_UI_WEBUI_COLOR_UTILS_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "third_party/skia/include/core/SkColor.h" | |
| 12 | |
|
pkotwicz
2017/02/27 20:50:59
Nit: ui/gfx/color_utils.h is probably a better hom
gonzalon
2017/02/27 21:33:17
Done.
| |
| 13 class ColorUtils { | |
| 14 public: | |
| 15 // Creates an rgba string for an SkColor. | |
| 16 static std::string SkColorToRGBAString(SkColor color); | |
| 17 | |
| 18 // Creates an rgba string for a color represented as an int64. | |
| 19 static std::string ColorToString(int64_t color); | |
|
pkotwicz
2017/02/27 20:50:59
I think that this method should remain an implemen
gonzalon
2017/02/27 21:33:17
It was mostly a convenience function to avoid havi
| |
| 20 | |
| 21 // Creates an rgb string for an SkColor, but leaves the alpha blank so that | |
| 22 // the css can fill it in. | |
| 23 static std::string SkColorToRGBComponents(SkColor color); | |
| 24 | |
| 25 private: | |
| 26 DISALLOW_COPY_AND_ASSIGN(ColorUtils); | |
| 27 }; | |
| 28 | |
| 29 #endif // CHROME_BROWSER_UI_WEBUI_COLOR_UTILS_H_ | |
| OLD | NEW |