getNeutralPalette method
Implementation
@override
TonalPalette getNeutralPalette(
Variant variant,
Hct sourceColorHct,
bool isDark,
Platform platform,
double contrastLevel,
) => switch (variant) {
.neutral => .fromHueAndChroma(
sourceColorHct.hue,
platform == .phone ? 1.4 : 6.0,
),
.tonalSpot => .fromHueAndChroma(
sourceColorHct.hue,
platform == .phone ? 5.0 : 10.0,
),
.expressive => .fromHueAndChroma(
_getExpressiveNeutralHue(sourceColorHct),
_getExpressiveNeutralChroma(sourceColorHct, isDark, platform),
),
.vibrant => .fromHueAndChroma(
_getVibrantNeutralHue(sourceColorHct),
_getVibrantNeutralChroma(sourceColorHct, platform),
),
_ => super.getNeutralPalette(
variant,
sourceColorHct,
isDark,
platform,
contrastLevel,
),
};