Makeup Rehab // The Great Lip Destash Pt 3, or “Forget Everything You Know About RGB: Converting to HSV”

As a recap, my first TGLD post talked about how to get swatches of your lipsticks into RGB components on Excel. From there, I talked a bit about RGB and what those numbers mean- and then how to identify colors that were close enough to really be considered dupes.

Throughout this process, I’ve mentioned using another way to characterize color: HSV. I’ve even mentioned that this way, IMO, is easier.

So what is HSV? How does it differ from RGB?

Both methods contain three components. In RGB, they are red, green, and blue. In HSV, they are hue, saturation, and value (this component is sometimes called luminosity). Hue refers to a specific color on a color wheel- meaning the quality of color. This is something over-arching, like “red” or “blue.” Hue also refers in part to undertone- a color moving towards red or orange would be considered ‘warm’ and moving towards blue would be considered “cool.” Saturation is related to purity, or how clear or muted a color is. A high saturation would indicate a very clear color; low saturation is muted. Value (or luminosity) tells us how light or dark that color is.

Whereas RGB is like a big cube (255x255x255), HSV is more of a cylinder (some models show it as a cone, but the idea is similar).

In the cylinder/cone model, hue is listed as a degree in the circle. Red is at 0 or 360. Blue is opposite at 180. We place saturation as something similar to the radius of the circle. So if you are close to the center (at 0), the color is less saturated. If you are closer to the edge (at 1, or sometimes listed as 100), you have a very saturated, pure/clear color. That puts value as the height of the cylinder (from 0 to 1 or 100); the higher up you go, the lighter the color. At the bottom of the cylinder, you have what is basically pure black.

Because all colors at a value of 0 = black, many people think of the cylinder more like a cone. They keep the value ranges the same, but they notice that as you decrease in value, the difference in saturation becomes less noticeable to our eye. Let’s show this.


What I’m getting at here is that to our eye, the difference between a saturation value of 100 and 80 (a difference is 20) looks very different from a saturation value of 20 and 0. This is why some people prefer the cone model.

Anyway, getting back to how to use HSV with your lipstick swatches. Let’s talk about how you can convert between RGB and HSV.

First and foremost, I should say this: many RGB colors will return similar HSV values, and as I’ve shown in the value/saturation picture above, different HSV values can have the same RGB value (black and white are culprits of this). There are not equal amounts of HSV and RGB values, but because HSV is more of a scale and RGB is more absolute, we *can* characterize each RGB into their own HSV. The only issue, here, is that many programs use HSV as asbolute integers, meaning they will take a huge of 300 or 301, but a hue of 300.7 would not be valid. Thus, we get only 3,600,000 colors out of a 360x100x100 model of HSV. This is vastly different from the 16,777,216 colors in the RGB model. To solve this, some programs convert HSV to a 0-255 scale for each color… While this is nice because it gives us a larger range of saturation and value to work with, this model also decreases the amount of hues available to work with. Whoops.

I prefer to use the 360x100x100 model of HSV. Yes, this model produces a smaller amount of colors. However, this may actually be more helpful when finding possible dupes for destashing purposes… plus, as we’ve already discussed, smaller changes in saturation and value when the other is trending toward 0 really don’t impact much how we see the color. Do we really need more than 67 colors in between 300,25,33 and 300,35,0? (Look back up at the image and decide if you could tell the difference between all those shades, realistically).

So now, let’s get into conversion. Converting RGB to HSV is actually fairly easy… you can even have Excel do it for you! Saturation and value are the easiest to convert to, but hue is a little trickier. I won’t go through the details of each equation, but I’ll put up the equation that you can use to copy/paste into excel (just remember to change the R, G, and B to the cell that holds your red, green, and blue values) and then talk a tiny bit about what the formula is doing.

Hue =IF(180/PI()*ATAN2(2*R-G-B,SQRT(3)*(G-B))<0,180/PI()*ATAN2(2*R-G-B,SQRT(3)*(G-B))+360,180/PI()*ATAN2(2*R-G-B,SQRT(3)*(G-B))). This one looks super messy, but it’s really not that bad. What the “mess” of this problem does is convert what is on a linear scale to something circular, since this model involves circles. It also ensures that you get a positive value. On a circle, -5 is the same as 355, but we don’t work in negative values in this model.

Value =(Max(R,G,B)/255)*100. You can enter this in as a formula on excel where R is your Red cell, G is your Green cell, and B is your Blue cell. Essentially, this means that value is relative to whatever component in RGB that is highest.

Saturation =IF((MAX(R,G,B)/255)=0,0,((MAX(RGB)/255)-(MIN(RGB))/255)/(MAX(RGB)/255))*100. This essentially means this: saturation is your max value – your min value divided by your max value. The “IF” statement here is just to fill in for the possible “undefined” result of trying to divide by 0 (if your max is 0, then your saturation is 0). You’ll see the 255 and 100 numbers- these are only for conversion purposes.

Remember: you only have to enter in a formula once. Once you get something that works, you can copy and paste it.

I might go into using other models that are similar to HSV, but they are slightly different. These models often try to compensate for the fact that both saturation and value seem to play a role in how clear/pure and how light/dark we see a color, even though saturation is supposed to just be purity and value is supposed to just be lightness/darkness.

Alrighty, I think we’re done for this one. I know a lot of people aren’t into these technical things the way I am, and for many, these tutorials so far haven’t been applicable. This does involve a lot of math, and I know that isn’t everybody’s strength. If you don’t want to use HSV, don’t use it! If you don’t want to use an Excel formula approach for conversion and would prefer, use Paint.NET’s color picker and just write down HSV values instead.

Let me know if there are any color models you are particularly interested in and I’ll look into them and see if they would be easy to convert in Excel!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s