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(
return cros_colors::ResolveColor(ColorName::kTextColorSecondary,
color_mode);
case ContentLayerType::kTextColorAlert:
light_color = gfx::kGoogleRed600;
dark_color = gfx::kGoogleRed300;
return cros_colors::ResolveColor(ColorName::kTextColorAlert, color_mode);
break;
case ContentLayerType::kTextColorWarning:
light_color = gfx::kGoogleYellow600;
dark_color = gfx::kGoogleYellow300;
return cros_colors::ResolveColor(ColorName::kTextColorWarning,
color_mode);
break;
case ContentLayerType::kTextColorPositive:
light_color = gfx::kGoogleGreen600;
dark_color = gfx::kGoogleGreen300;
return cros_colors::ResolveColor(ColorName::kTextColorPositive,
color_mode);
break;
case ContentLayerType::kIconColorPrimary:
return cros_colors::ResolveColor(ColorName::kIconColorPrimary,
......@@ -339,16 +338,15 @@ SkColor AshColorProvider::GetContentLayerColorImpl(
light_color = dark_color = gfx::kGoogleGrey500;
break;
case ContentLayerType::kIconColorAlert:
light_color = gfx::kGoogleRed600;
dark_color = gfx::kGoogleRed300;
return cros_colors::ResolveColor(ColorName::kIconColorAlert, color_mode);
break;
case ContentLayerType::kIconColorWarning:
light_color = gfx::kGoogleYellow600;
dark_color = gfx::kGoogleYellow300;
return cros_colors::ResolveColor(ColorName::kIconColorWarning,
color_mode);
break;
case ContentLayerType::kIconColorPositive:
light_color = gfx::kGoogleGreen600;
dark_color = gfx::kGoogleGreen300;
return cros_colors::ResolveColor(ColorName::kIconColorPositive,
color_mode);
break;
case ContentLayerType::kIconColorProminent:
case ContentLayerType::kSliderThumbColorEnabled:
......
......@@ -26,6 +26,18 @@
light: "$google_grey_700",
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: {
light: "#ffffff",
......@@ -36,7 +48,18 @@
light: "$google_grey_700",
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: {
light: "$google_blue_600",
dark: "$google_blue_300",
......@@ -73,8 +96,7 @@
link_color: "$google_blue_700",
/* button-primary */
button_background_color_primary:
"$icon_color_prominent",
button_background_color_primary: "$icon_color_prominent",
button_label_color_primary: {
light: "$google_grey_200",
dark: "$google_grey_900",
......@@ -97,8 +119,7 @@
},
/* button-secondary */
button_label_color_secondary:
"$icon_color_prominent",
button_label_color_secondary: "$icon_color_prominent",
button_stroke_color_secondary: {
light: "$google_grey_300",
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