getVerticalShadow static method
Get the vertical shadow HSLColor from the given color. The shadow color depends on the lightness of the given color.
Implementation
static HSLColor getVerticalShadow(Color color) {
HSLColor hslColor = HSLColor.fromColor(color);
if (hslColor.lightness >= 0.3) {
return hslColor.withLightness(hslColor.lightness - 0.2);
} else {
return hslColor.withLightness(hslColor.lightness + 0.1);
}
}