Index: ui/gfx/color_utils.h |
diff --git a/ui/gfx/color_utils.h b/ui/gfx/color_utils.h |
index 72dbb58610a4dd66e852c0384ecdb9f6f48e990c..55bd3e1a0856d9e5841ac2d4ac06f2a9d13850f5 100644 |
--- a/ui/gfx/color_utils.h |
+++ b/ui/gfx/color_utils.h |
@@ -88,6 +88,9 @@ GFX_EXPORT double CalculateBoringScore(const SkBitmap& bitmap); |
GFX_EXPORT SkColor AlphaBlend(SkColor foreground, SkColor background, |
SkAlpha alpha); |
+// Returns true if the luminance of |color| is closer to black than white. |
+GFX_EXPORT bool IsDark(SkColor color); |
+ |
// Makes a dark color lighter or a light color darker by blending |color| with |
// white or black depending on its current luminance. |alpha| controls the |
// amount of white or black that will be alpha-blended into |color|. |