FlexTones.oneHue constructor

FlexTones.oneHue(
  1. Brightness brightness
)

Create a M3 tonal palette tones extraction, but with no hue rotation from primary if no ARGB key color is provided for tertiary palette.

This setup will if only one seed color is used, produce a slightly more chromatic color set than FlexTones.material, since it does not rotate hue from primary to get hue for tertiary, it will create a color scheme using tonal palettes that are based on the same hue, but with different chroma. In simple terms, all colors are shades of the provided key color to seed the tonal palettes. We can get a nice one hue toned theme with this configuration.

Implementation

factory FlexTones.oneHue(Brightness brightness) =>
    brightness == Brightness.light
        ? const FlexTones.light(
            secondaryContainerTone: 95,
            tertiaryTone: 30,
            tertiaryContainerTone: 80,
            //
            primaryMinChroma: 55,
            secondaryChroma: 26,
            tertiaryChroma: 36,
            tertiaryHueRotation: 0,
          )
        : const FlexTones.dark(
            tertiaryTone: 90,
            tertiaryContainerTone: 40,
            onTertiaryContainerTone: 95,
            //
            primaryMinChroma: 55,
            secondaryChroma: 26,
            tertiaryChroma: 36,
            tertiaryHueRotation: 0,
          );