Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "third_party/skia/include/core/SkColor.h" | 9 #include "third_party/skia/include/core/SkColor.h" |
| 10 #include "ui/gfx/gfx_export.h" | 10 #include "ui/gfx/gfx_export.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 // NOTE: This won't do anything but waste time if the supplied foreground color | 96 // NOTE: This won't do anything but waste time if the supplied foreground color |
| 97 // has a luma value close to the midpoint (0.5 in the HSL representation). | 97 // has a luma value close to the midpoint (0.5 in the HSL representation). |
| 98 GFX_EXPORT SkColor GetReadableColor(SkColor foreground, SkColor background); | 98 GFX_EXPORT SkColor GetReadableColor(SkColor foreground, SkColor background); |
| 99 | 99 |
| 100 // Invert a color. | 100 // Invert a color. |
| 101 GFX_EXPORT SkColor InvertColor(SkColor color); | 101 GFX_EXPORT SkColor InvertColor(SkColor color); |
| 102 | 102 |
| 103 // Gets a Windows system color as a SkColor | 103 // Gets a Windows system color as a SkColor |
| 104 GFX_EXPORT SkColor GetSysSkColor(int which); | 104 GFX_EXPORT SkColor GetSysSkColor(int which); |
| 105 | 105 |
| 106 // Returns true only if Chrome should use an inverted color scheme - which is | |
| 107 // only true if the system has high-contrast mode enabled and and is using a | |
| 108 // light-on-dark color scheme. To be notified when this status changes, use | |
| 109 // ScopedSysColorChangeListener, below. | |
|
sadrul
2015/07/07 04:36:54
Update the comment.
mlamouri (slow - plz ping)
2015/07/07 13:45:15
Done.
| |
| 110 GFX_EXPORT bool IsInvertedColorScheme(); | |
| 111 | |
| 106 } // namespace color_utils | 112 } // namespace color_utils |
| 107 | 113 |
| 108 #endif // UI_GFX_COLOR_UTILS_H_ | 114 #endif // UI_GFX_COLOR_UTILS_H_ |
| OLD | NEW |