Skip to content

Commit

Permalink
fix(dynamic_color): secondary container color
Browse files Browse the repository at this point in the history
`secondary_container` is currently the same as `secondary`.
This fixes it.

The new test value is taken from the updated output.
  • Loading branch information
allan2 committed Mar 13, 2024
1 parent 981a352 commit 4a4b6e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dynamic_color/material_dynamic_colors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ impl MaterialDynamicColors {
[tone, scheme] => if _is_monochrome(scheme) { if scheme.is_dark { 30.0 } else { 85.0 } } else if _is_fidelity(scheme) { if scheme.is_dark { 30.0 } else { 90.0 } } else { Self::_find_desired_chroma_by_tone(scheme.secondary_palette.hue(), scheme.secondary_palette.chroma(), if scheme.is_dark { 30.0 } else { 90.0 }, !scheme.is_dark) };
[background, scheme] => Self::highest_surface(scheme);
[contrast_curve] => ContrastCurve { low: 1.0, normal: 1.0, medium: 3.0, high: 4.5 };
[tone_delta_pair, _scheme] => ToneDeltaPair::new(Self::primary_container(), Self::primary(), 10.0, TonePolarity::Nearer, false);
[tone_delta_pair, _scheme] => ToneDeltaPair::new(Self::secondary_container(), Self::secondary(), 10.0, TonePolarity::Nearer, false);
}

define_key! {
Expand Down
2 changes: 1 addition & 1 deletion tests/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn test_theme() -> Result<(), ParseError> {
on_primary_fixed_variant: [255, 35, 80, 36],
secondary: [255, 185, 204, 180],
on_secondary: [255, 37, 52, 35],
secondary_container: [255, 185, 204, 180],
secondary_container: [255, 59, 75, 56],
on_secondary_container: [255, 213, 232, 207],
secondary_fixed: [255, 213, 232, 207],
secondary_fixed_dim: [255, 185, 204, 180],
Expand Down

0 comments on commit 4a4b6e1

Please sign in to comment.