material-foundation / material-color-utilities

Color libraries for Material You
Apache License 2.0
1.57k stars 134 forks source link

[Dart] `Scheme.onErrorContainer` assigned incorrect color tone in `Scheme.darkFromCorePalette` #124

Open amal-stack opened 8 months ago

amal-stack commented 8 months ago

The Dart implementation of the Scheme class's darkFromCorePalette method assigns an incorrect color tone to the onErrorContainer property: palette.error.get(80) instead of palette.error.get(90). https://github.com/material-foundation/material-color-utilities/blob/45798afb18dbe09ce948b765b375f064099f944f/dart/lib/scheme/scheme.dart#L126C2-L142C49

It appears that there are plans to deprecate the Scheme class soon in favor of DynamicScheme. However, since it is currently used in Flutter's ColorScheme.fromSeed implementation, it may be worth updating the implementation to match the specification.

### Tasks