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

Unified Diff: ui/gfx/color_utils.cc

Issue 1408273002: Make some updates to BM bar for MD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: also update detached bg 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
Index: ui/gfx/color_utils.cc
diff --git a/ui/gfx/color_utils.cc b/ui/gfx/color_utils.cc
index b042538c3bf2d672a08f0a4b166fcf6f4efc40d7..9d9a172df703d6053dabb75140f109957b5f18c5 100644
--- a/ui/gfx/color_utils.cc
+++ b/ui/gfx/color_utils.cc
@@ -77,6 +77,10 @@ double ContrastRatio(double foreground_luminance, double background_luminance) {
// ----------------------------------------------------------------------------
+double GetContrastRatio(SkColor color_a, SkColor color_b) {
+ return ContrastRatio(RelativeLuminance(color_a), RelativeLuminance(color_b));
+}
+
unsigned char GetLuminanceForColor(SkColor color) {
return base::saturated_cast<unsigned char>(
(0.3 * SkColorGetR(color)) +
« chrome/browser/ui/views/bookmarks/bookmark_bar_instructions_view.cc ('K') | « ui/gfx/color_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698