Sign in to follow this  
Lawbro

On specific color values

Recommended Posts

While I was messing with the HSV values in the pallette window I noticed that often some of the values would change from what I'd specified by increments of 1 or 2. I understand that this is a pretty small change but I still found it bothersome that something was keeping me from having complete control over what I wanted the color to be.

Is this intentional? Is this some overlooked bug? Is this common in other digital art programs? Some unavoidable result of whatever is used to calculate the color values? Something I'm missing here?

I would really appreciate if somebody were to shed some light on this.

Share this post


Link to post
Share on other sites

I've been noticing this for the HSV sliders in the pallette window. Let's say I set the S to a value of 40. I click on a different color to edit that, and then come back to see it is 39. Is this any clearer? I can take screen shots to show you if I'm doing a bad job of describing it to you.

This happens for all of the Sliders in HSV, but I don't know if it does for RGB.

Also, my version is 3.5.8. if that is of any help. I think it'd be a good idea to see what version PDNnoob is using as well

Share this post


Link to post
Share on other sites

That's just rounding errors. Colors are stored in RGB format, even if you set them with the HSV sliders.

When you set a color with the HSV sliders, it gets converted to an RGB color. If you save it in the palette and choose it again, it's loading the RGB color, and converting it back to HSV to set those sliders. So it's getting round-tripped from HSV->RGB->HSV.

  • Upvote 1

Share this post


Link to post
Share on other sites

That's just rounding errors. Colors are stored in RGB format, even if you set them with the HSV sliders.

When you set a color with the HSV sliders, it gets converted to an RGB color. If you save it in the palette and choose it again, it's loading the RGB color, and converting it back to HSV to set those sliders. So it's getting round-tripped from HSV->RGB->HSV.

Thanks so much, pyro! That's something I'll need to take note of in the future...

Share this post


Link to post
Share on other sites

That sounds like a bug to me.

Intentional, perhaps, but I don't think it's really acceptable to let colors you select be changed due to rounding tips while converting.

Share this post


Link to post
Share on other sites

I'm not 100% sure but..... there probably isn't a perfect mapping of RGB -> HSV. Much like there is no perfect mapping of RGB to CYMK.

You can rest assured that the RGB values will not change, but their interpretations in the HSV values may. It's down to rounding - as Pyrochild said.

Share this post


Link to post
Share on other sites

That sounds like a bug to me.

Intentional, perhaps, but I don't think it's really acceptable to let colors you select be changed due to rounding tips while converting.

It's not a bug at all. No colors are being changed.

If you input 40, and then the value gets changed to 39, it's because both of those were exactly the same RGB color, so you have nothing to worry about. And all the formats store RGB colors anyway so you wouldn't gain anything from having paint.net use HSV internally.

Edited by Faral

Share this post


Link to post
Share on other sites

Oh alright. So it's more of a failure for HSV to accurately express the RGB color selected, rather than a failure of HSV to correctly choose the RGB color you selected.

Share this post


Link to post
Share on other sites

Not really a failure...but that's just semantics. Yes, it's an inherent limitation in the differences between HSV, RGB, and CMYK. In each colorspace, there are colors that the other cannot render, or references to colors that will come out identical. There are literally an infinite number of colors that can be described in the world; RGB can only describe 16,277,216 of them (want to see them all? Click Here). That's a lot of colors (your computer will choke on it if it's not up to the task), but there are still subtle, undetectable variations between even 112, 112, 112 (hex #707070) and 112, 112, 113 (hex #707071). An infinite number of them. So RGB describes a mere 16.8 million colors, CMYK describes most of those but not all and a bunch more besides, and HSV overlaps both while describing still more colors. There are other models, too: Tristimulus, CIE, Pantone, sRGB, CcMmYK, YPbPr, RYB - all describing color spaces which overlap but don't fit completely inside the others.

Be thankful that PdN only deals with RGB and HSV (with Alpha).

(Okay, so technically, HSV is a description of RGB. But the point stands.)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this