| 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
|
|
|