Converts an RGB color value to its corresponding lightness component in the HSL color space.
lightness = rgb_to_lightness(color)
Get the lightness of pure black (RGB: 0, 0, 0)
rgb_to_lightness(0x000000); // returns 0.0
Get the lightness of pure white (RGB: 255, 255, 255)
rgb_to_lightness(0xFFFFFF); // returns 100.0
Get the lightness of a medium gray (RGB: 128, 128, 128)
rgb_to_lightness(0x808080); // returns 50.1960814
Get the lightness of a light blue color (RGB: 173, 216, 230)
rgb_to_lightness(0xADD8E6); // returns 79.01960784