getNeutralPalette method
Implementation
@override
TonalPalette getNeutralPalette(
Variant variant,
Hct sourceColorHct,
bool isDark,
Platform platform,
double contrastLevel,
) => switch (variant) {
.content || .fidelity => .fromHueAndChroma(
sourceColorHct.hue,
sourceColorHct.chroma / 8.0,
),
.fruitSalad => .fromHueAndChroma(sourceColorHct.hue, 10.0),
.monochrome => .fromHueAndChroma(sourceColorHct.hue, 0.0),
.neutral => .fromHueAndChroma(sourceColorHct.hue, 2.0),
.rainbow => .fromHueAndChroma(sourceColorHct.hue, 0.0),
.tonalSpot => .fromHueAndChroma(sourceColorHct.hue, 6.0),
.expressive => .fromHueAndChroma(
MathUtils.sanitizeDegreesDouble(sourceColorHct.hue + 15.0),
8.0,
),
.vibrant => .fromHueAndChroma(sourceColorHct.hue, 10.0),
};