FlexTones.chroma constructor

FlexTones.chroma(
  1. Brightness brightness
)

Creates a tonal palette setup that results in a high contrast colorful theme with background and surface tone 98, in light mode and very low chroma in neutrals light mode (2 and 4) and moderate in dark mode (3 and 6). Dark mode uses dark surface and background tone 6.

The FlexPaletteType.extended is used as palette type for more fidelity in high tones and for more tones options.

Implementation

factory FlexTones.chroma(Brightness brightness) =>
    brightness == Brightness.light
        ? const FlexTones.light(
            primaryTone: 40,
            primaryContainerTone: 80,
            onPrimaryContainerTone: 4,
            secondaryTone: 60,
            secondaryContainerTone: 92,
            onSecondaryContainerTone: 10,
            tertiaryTone: 50,
            tertiaryContainerTone: 95,
            onTertiaryContainerTone: 6,
            //
            backgroundTone: 98,
            onBackgroundTone: 6,
            surfaceTone: 98,
            onSurfaceTone: 6,
            surfaceVariantTone: 92,
            onSurfaceVariantTone: 10,
            onInverseSurfaceTone: 98,
            inversePrimaryTone: 90,
            outlineTone: 30,
            outlineVariantTone: 70,
            surfaceTintTone: 30,
            //
            primaryMinChroma: 0,
            secondaryMinChroma: 0,
            tertiaryMinChroma: 0,
            neutralChroma: 2,
            neutralVariantChroma: 4,
            paletteType: FlexPaletteType.extended,
          )
        : const FlexTones.dark(
            primaryTone: 80,
            onPrimaryTone: 12,
            primaryContainerTone: 40,
            onPrimaryContainerTone: 97,
            secondaryTone: 70,
            onSecondaryTone: 4,
            secondaryContainerTone: 50,
            onSecondaryContainerTone: 96,
            tertiaryTone: 87,
            onTertiaryTone: 5,
            onTertiaryContainerTone: 92,
            onErrorTone: 6,
            onErrorContainerTone: 95,
            //
            backgroundTone: 6,
            onBackgroundTone: 95,
            surfaceTone: 6,
            onSurfaceTone: 95,
            surfaceVariantTone: 20,
            onSurfaceVariantTone: 90,
            onInverseSurfaceTone: 10,
            outlineTone: 60,
            outlineVariantTone: 40,
            surfaceTintTone: 95,
            //
            primaryMinChroma: 0,
            secondaryMinChroma: 0,
            tertiaryMinChroma: 0,
            neutralChroma: 3,
            neutralVariantChroma: 6,
            paletteType: FlexPaletteType.extended,
          );