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

Unified Diff: ui/gfx/color_utils.h

Issue 1448433004: [MD] update EV bubble icon and location bar https icons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build.gn Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/color_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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|.
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/color_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698