Commit bd082898 authored by Christopher Lam's avatar Christopher Lam Committed by Commit Bot

[cros_colors] Add updated color values.

This CL adds some semantic colors that have been specified by UX and
moves the AshColorProvider implementation into cros_colors.json5.

Bug: 1018654
Change-Id: I235af03f9f27816ec52c9f8305cf27a185847bdd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2335622
Commit-Queue: calamity <calamity@chromium.org>
Reviewed-by: default avatarJiewei Qian  <qjw@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797551}
parent 5b9647c9
...@@ -321,16 +321,15 @@ SkColor AshColorProvider::GetContentLayerColorImpl( ...@@ -321,16 +321,15 @@ SkColor AshColorProvider::GetContentLayerColorImpl(
return cros_colors::ResolveColor(ColorName::kTextColorSecondary, return cros_colors::ResolveColor(ColorName::kTextColorSecondary,
color_mode); color_mode);
case ContentLayerType::kTextColorAlert: case ContentLayerType::kTextColorAlert:
light_color = gfx::kGoogleRed600; return cros_colors::ResolveColor(ColorName::kTextColorAlert, color_mode);
dark_color = gfx::kGoogleRed300;
break; break;
case ContentLayerType::kTextColorWarning: case ContentLayerType::kTextColorWarning:
light_color = gfx::kGoogleYellow600; return cros_colors::ResolveColor(ColorName::kTextColorWarning,
dark_color = gfx::kGoogleYellow300; color_mode);
break; break;
case ContentLayerType::kTextColorPositive: case ContentLayerType::kTextColorPositive:
light_color = gfx::kGoogleGreen600; return cros_colors::ResolveColor(ColorName::kTextColorPositive,
dark_color = gfx::kGoogleGreen300; color_mode);
break; break;
case ContentLayerType::kIconColorPrimary: case ContentLayerType::kIconColorPrimary:
return cros_colors::ResolveColor(ColorName::kIconColorPrimary, return cros_colors::ResolveColor(ColorName::kIconColorPrimary,
...@@ -339,16 +338,15 @@ SkColor AshColorProvider::GetContentLayerColorImpl( ...@@ -339,16 +338,15 @@ SkColor AshColorProvider::GetContentLayerColorImpl(
light_color = dark_color = gfx::kGoogleGrey500; light_color = dark_color = gfx::kGoogleGrey500;
break; break;
case ContentLayerType::kIconColorAlert: case ContentLayerType::kIconColorAlert:
light_color = gfx::kGoogleRed600; return cros_colors::ResolveColor(ColorName::kIconColorAlert, color_mode);
dark_color = gfx::kGoogleRed300;
break; break;
case ContentLayerType::kIconColorWarning: case ContentLayerType::kIconColorWarning:
light_color = gfx::kGoogleYellow600; return cros_colors::ResolveColor(ColorName::kIconColorWarning,
dark_color = gfx::kGoogleYellow300; color_mode);
break; break;
case ContentLayerType::kIconColorPositive: case ContentLayerType::kIconColorPositive:
light_color = gfx::kGoogleGreen600; return cros_colors::ResolveColor(ColorName::kIconColorPositive,
dark_color = gfx::kGoogleGreen300; color_mode);
break; break;
case ContentLayerType::kIconColorProminent: case ContentLayerType::kIconColorProminent:
case ContentLayerType::kSliderThumbColorEnabled: case ContentLayerType::kSliderThumbColorEnabled:
......
...@@ -26,6 +26,18 @@ ...@@ -26,6 +26,18 @@
light: "$google_grey_700", light: "$google_grey_700",
dark: "$google_grey_500", dark: "$google_grey_500",
}, },
text_color_alert: {
light: "$google_red_600",
dark: "$google_red_300",
},
text_color_warning: {
light: "$google_yellow_600",
dark: "$google_yellow_300",
},
text_color_positive: {
light: "$google_green_600",
dark: "$google_green_300",
},
bg_color: { bg_color: {
light: "#ffffff", light: "#ffffff",
...@@ -36,7 +48,18 @@ ...@@ -36,7 +48,18 @@
light: "$google_grey_700", light: "$google_grey_700",
dark: "$google_grey_200", dark: "$google_grey_200",
}, },
icon_color_alert: {
light: "$google_red_600",
dark: "$google_red_300",
},
icon_color_warning: {
light: "$google_yellow_600",
dark: "$google_yellow_300",
},
icon_color_positive: {
light: "$google_green_600",
dark: "$google_green_300",
},
icon_color_prominent: { icon_color_prominent: {
light: "$google_blue_600", light: "$google_blue_600",
dark: "$google_blue_300", dark: "$google_blue_300",
...@@ -73,8 +96,7 @@ ...@@ -73,8 +96,7 @@
link_color: "$google_blue_700", link_color: "$google_blue_700",
/* button-primary */ /* button-primary */
button_background_color_primary: button_background_color_primary: "$icon_color_prominent",
"$icon_color_prominent",
button_label_color_primary: { button_label_color_primary: {
light: "$google_grey_200", light: "$google_grey_200",
dark: "$google_grey_900", dark: "$google_grey_900",
...@@ -97,8 +119,7 @@ ...@@ -97,8 +119,7 @@
}, },
/* button-secondary */ /* button-secondary */
button_label_color_secondary: button_label_color_secondary: "$icon_color_prominent",
"$icon_color_prominent",
button_stroke_color_secondary: { button_stroke_color_secondary: {
light: "$google_grey_300", light: "$google_grey_300",
dark: "$google_grey_700", dark: "$google_grey_700",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment