Mobile app version of vmapp.org
Login or Join
Si6392903

: One RGB color could only match single one HSL color? I am wondering if there is single one matched HSL color for a given RGB color? Based on existing formula converting RGB to HSL, it is

@Si6392903

Posted in: #ColorConversion

I am wondering if there is single one matched HSL color for a given RGB color?

Based on existing formula converting RGB to HSL, it is yes.

However, I want to know if my assertion above is true?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Si6392903

1 Comments

Sorted by latest first Latest Oldest Best

 

@Kaufman565

Relying solely on common sense:

RGB is defined by


Red ranges from 0 to 255 (256 options)
Green ranges from 0 to 255 (256 options)
Blue ranges from 0 to 255 (256 options)


Total number of RGB options = 256*256*256 = 16,777,216

HSL is defined by:


Hue - ranges from 0 to 359 (360 options)
Saturation - ranges from 0 to 100 (101 options)
Lightness(luminosity) - ranges from 0 to 100 (101 options)


Total number of HSL options = 360*101*101 = 3,672,360

My guess here is that since the total number of RGB colors is much higher than that of HSL colors, it's impossible to have 1 - 1 correspondence between the formats.

Will a convertor convert every RGB value to an HSL value - absolutely - it will round off to the closest value it can assign.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme