SchemeExpressive constructor

SchemeExpressive({
  1. required Hct sourceColorHct,
  2. required bool isDark,
  3. required double contrastLevel,
})

Implementation

SchemeExpressive({
  required Hct sourceColorHct,
  required super.isDark,
  required super.contrastLevel,
}) : super(
        sourceColorArgb: sourceColorHct.toInt(),
        variant: Variant.expressive,
        primaryPalette: TonalPalette.of(
          MathUtils.sanitizeDegreesDouble(sourceColorHct.hue + 240.0),
          40.0,
        ),
        secondaryPalette: TonalPalette.of(
          DynamicScheme.getRotatedHue(
              sourceColorHct, hues, secondaryRotations),
          24.0,
        ),
        tertiaryPalette: TonalPalette.of(
          DynamicScheme.getRotatedHue(
              sourceColorHct, hues, tertiaryRotations),
          32.0,
        ),
        neutralPalette: TonalPalette.of(sourceColorHct.hue + 15.0, 8.0),
        neutralVariantPalette:
            TonalPalette.of(sourceColorHct.hue + 15.0, 12.0),
      );