toColor method
Returns this HSLuv color as an sRGB Color.
Implementation
Color toColor() {
final rgb = Hsluv.hsluvToRgb([hue, saturation, lightness]);
return Color.fromARGB(
255,
(rgb[0] * 255).round().clamp(0, 255),
(rgb[1] * 255).round().clamp(0, 255),
(rgb[2] * 255).round().clamp(0, 255),
);
}