Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HSB vs HSL vs HSV

Tags:

c++

colors

hsl

hsv

hsb

I am making a Color class as a part of a very basic graphics API in c++. So I decided to take a look at Microsoft's .NET framework and noticed that their Color class has functions for HSB.

Then I started a research to determine whether I should provide HSB, HSL or HSV or ALL of them in my class.

So, I have 3 questions on HSB, HSL, HSV:

  1. Is HSB same as HSL?

  2. If not, why isn't there an HSBL or even HSBLV?

  3. I find many different methods of calculating these values, can someone show me the FASTEST ones?

like image 852
Giwrgos Tsopanoglou Avatar asked Mar 27 '13 20:03

Giwrgos Tsopanoglou


People also ask

Is HSB same as HSV?

HSB is stands for hue, saturation, brightness. It is a color system, to pick color. It's being said that this system is more human-friendly to describing color. In Wikipedia, the term is called HSV (hue, saturation, value).

Is HSL same as HSV?

The difference between HSL and HSV is that a color with maximum lightness in HSL is pure white, but a color with maximum value/brightness in HSV is analogous to shining a white light on a colored object (e.g. shining a bright white light on a red object causes the object to still appear red, just brighter and more ...

What is the difference between HSL and HSB?

Hence, the only difference is that in HSB, 100% Brightness can give you the White Colour only when the Saturation is 0 while in HSL 100% Lightness will give you the White Colour irrespective of the Saturation.

Is HSV and HSI same?

The representations HSV, HSI and HSL are very similar, but not completely identical. The hue component H in all three color spaces is an angular measurement, analogous to position around a color wheel. A hue value of 0°corresponds to red, 120° corresponds to green, and 240° corresponds to blue.


2 Answers

Is HSB same as HSL?

No, HSB is the same as HSV but HSL is different. All these are used as a friendly way to represent RGB colors. The Wikipedia article on HSL an HSV explains the differences using color cilinders: HSL and HSV Basically, Hue is the same for HSB and HSL but the Saturation takes different values and Brightness and Lightness are also different.

If not, why isn't there an HSBL or even HSBLV?

I don't get the point. Both HSB/HSV and HSL can represent any RGB color. Having B and L independently is not possible because of the way they are defined. A given HSB Brightness and Saturation is associated to a fixed Lightness. In fact converting between them is very easy.

I find many different methods of calculating these values, can someone show me the FASTEST ones?

There's a similar question here for calculating HSB from RGB: Fast, optimized and accurate RGB <-> HSB conversion code in C There's a Java implementation there that might help. For converting between HSB/HSV and HSL see HSL vs HSB vs HSV

like image 168
JoseV Avatar answered Sep 19 '22 22:09

JoseV


Originally the difference between Brightness And Lightness Is. "Brightness" is used for Subtractive colors and "Lightness" for Additive colors. Now if your program is dealing with Subtractive colors like the CMYK system it is better to use HSB otherwise it is better HSL.

like image 35
aziz Avatar answered Sep 21 '22 22:09

aziz