shared::utils::colors_utils

Function hsl_to_rgb

Source
pub fn hsl_to_rgb(hsl: HSL) -> RGB
Expand description

Convert a color from HSL to RGB

§Arguments

  • hsl: A HSL containing the HSL values of the color (Hue, Saturation, Lightness)

§Returns

Returns a tuple containing the RGB values of the color

§Details

This function is based on the algorithm found at https://www.rapidtables.com/convert/color/hsl-to-rgb.html