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

Unified Diff: ui/gfx/color_utils.h

Issue 1408273002: Make some updates to BM bar for MD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: eschew redundancy Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc ('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 fd6415eeecc7d437231c3b2de8491c558a882bb4..72dbb58610a4dd66e852c0384ecdb9f6f48e990c 100644
--- a/ui/gfx/color_utils.h
+++ b/ui/gfx/color_utils.h
@@ -20,6 +20,13 @@ struct HSL {
double l;
};
+// The minimum contrast between text and background that is still readable.
+// This value is taken from w3c accessibility guidelines.
+const double kMinimumReadableContrastRatio = 4.5f;
+
+// Determines the contrast ratio of two colors.
+GFX_EXPORT double GetContrastRatio(SkColor color_a, SkColor color_b);
+
GFX_EXPORT unsigned char GetLuminanceForColor(SkColor color);
// Calculated according to http://www.w3.org/TR/WCAG20/#relativeluminancedef
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc ('k') | ui/gfx/color_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698