Lorenerd11 Posted February 26, 2020 Share Posted February 26, 2020 Alright, let's say I want to use a color with the HSV value 99, 100, 39, and place a pixel with the color selected Next, select the color picker. Select the white background, and then select the placed pixel, and check the color value. For some reason, the color value dropped from 99, 100, 39 to 99, 100, 38. This happens pretty consistently whenever manually entering color value... except when it doesn't, and upon entering 99, 100, 40, the color stayed at that value without dropping down to 99, 100, 39. The above example, in itself, can easily be considered a non-issue – it's the same RGB value and color hex code after all. So let's move on to another example. I've got a pixel with the HSV value of 99, 65, 70. Let's see what happens when I try to re-enter '70' manually. Look at the RGB/Hex value. For some reason, re-entering the same HSV value changed the RGB/Hex value entirely. You could chalk that up to a conversion error. But what's even more surprising is that the HSV value of the placed color isn't consistent with the entered value either. Once again, HSV values dropped by one, turning 99, 65, 70 into 98, 65, 69 – and this time, changing the RGB/Hex values entirely. There's something broken about manually entering HSV values that ends up failing to select the right RGB/Hex value, producing completely different HSV values once the color is placed on the canvas. Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted February 26, 2020 Share Posted February 26, 2020 The colors in your image are RGB values, and they represent the true/real/actual values. The HSV vales are just approximations based on the RGB values, and are provided for convenience. They do not represent the true values in your image. The two color modes (RGB & HSV) are not interchangeable, and there's really no way to 100% accurately convert from one to another. Thus you'll see that "off by 1" behavior. 1 1 Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Lorenerd11 Posted February 26, 2020 Author Share Posted February 26, 2020 (edited) Couldn't there be a way to avoid it in circumstances like the second one, where there actually is an RGB value accurately reflecting the HSV value? Edited February 26, 2020 by Lorenerd11 Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted February 26, 2020 Share Posted February 26, 2020 1 hour ago, Lorenerd11 said: ... where there actually is an RGB value accurately reflecting the HSV value? But there isn't a RGB value accurately reflecting the HSV value. 1 Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Lorenerd11 Posted February 26, 2020 Author Share Posted February 26, 2020 Please reread the second example. #68B53F accurately reflected the HSV value of 99, 65, 70, but for some reason, entering that HSV value changed the RGB value to #67B23E (which had the mismatching HSV value of 98, 65, 69) Quote Link to comment Share on other sites More sharing options...
Reptillian Posted February 26, 2020 Share Posted February 26, 2020 You aren't going to always have a very accurate conversion from HSV to RGB. For the sake of discussion, I ran this code within code filters of g'mic-qt and you'd see the result with display debug. f [210,1,.75,255] hsi2rgb s c #RGBA: 0,191.3,382.5,255# RGBA INT8 has a range of 0-255. Hue of 210 with 100% Saturation and 75% Intensity is equivalent of 0,191.3,382.5. That's not possible with RGBA INT8 restriction. Quote G'MIC Filter Developer Link to comment Share on other sites More sharing options...
toe_head2001 Posted February 26, 2020 Share Posted February 26, 2020 25 minutes ago, Lorenerd11 said: #68B53F accurately reflected the HSV value of ... Sorry, that's incorrect. The HEX value represents the RGB value. Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Reptillian Posted February 26, 2020 Share Posted February 26, 2020 Also, I would like to add that RGB INT8 can have a degree of error when converting from HSV to RGB. @toe_head2001 alluded to that, but I'll say it anyway. As you can see with the example above, note the decimal point. RGB INT8 has no concept of decimal point. So, it's not that accurate, but just accurate for production. Quote G'MIC Filter Developer Link to comment Share on other sites More sharing options...
Lorenerd11 Posted February 27, 2020 Author Share Posted February 27, 2020 On 2/26/2020 at 3:53 AM, toe_head2001 said: Sorry, that's incorrect. The HEX value represents the RGB value. By "reflect", I meant a match between displayed HSV values. #68B53F had the HSV value of 99, 65, 70. But entering that exact HSV value resulted in #67B23E, which has the HSV value of 98, 65, 69 Quote Link to comment Share on other sites More sharing options...
HyReZ Posted February 27, 2020 Share Posted February 27, 2020 (edited) Paint.NET uses sRGB absolute color space developed by HP & Microsoft in 1996 and is used as a fast and precise way to create an additive color system to computer devices such as monitors and printers. HSV is a relative color space developed in the 1970s to represent how the human eye perceives the mixing of pigments and apply that mathematics to RGB color space. How it determines Values & Gamma in that color space differs and that is what is causing problems finding exact relationships in the settings within the Paint.NET's expanded Colors Window. Sources:https://en.wikipedia.org/wiki/List_of_color_spaces_and_their_uses Edited February 27, 2020 by HyReZ Quote Link to comment Share on other sites More sharing options...
Reptillian Posted February 27, 2020 Share Posted February 27, 2020 (edited) 3 hours ago, HyReZ said: HSV is a relative color space developed in the 1970s to represent how the human eye perceives the mixing of pigments and apply that mathematics to RGB color space. How it determines Values & Gamma in that color space differs and that is what is causing problems finding exact relationships in the settings within the Paint.NET's expanded Colors Window. I thought human eye perception color space models would be CieLUV, CieLAB, LCH, and XYZ. XYZ being the primary source. 7 hours ago, Lorenerd11 said: By "reflect", I meant a match between displayed HSV values. #68B53F had the HSV value of 99, 65, 70. But entering that exact HSV value resulted in #67B23E, which has the HSV value of 98, 65, 69 My guess is that this has to do with rounding. As you can see with the output of gmic-qt code, there's decimal point after 191. Internally, your source either ceiling or round or Paint.NET either floor or round. This would be something @Rick Brewster can answer as none of us other than @Rick Brewster has access to. If it were up to me to change how this works, I would use round than ceiling or flooring to have more accuracy. Edited February 27, 2020 by Reptillian Quote G'MIC Filter Developer Link to comment Share on other sites More sharing options...
HyReZ Posted February 27, 2020 Share Posted February 27, 2020 (edited) 43 minutes ago, Reptillian said: I thought human eye perception color space models would be CieLUV, CieLAB, LCH, and XYZ. XYZ being the primary source. Nope!HSV (hue, saturation, value) is an alternative representations of the RGB color space model, designed in 1978 by a computer graphics researcher Alvy Ray Smith to more closely align with the way human vision perceives color-making attributes.HSV colors can have fractional values represent as decimals You can see references for more nfo.https://en.wikipedia.org/wiki/HSL_and_HSV Edited February 27, 2020 by HyReZ Quote Link to comment Share on other sites More sharing options...
Reptillian Posted February 27, 2020 Share Posted February 27, 2020 (edited) 17 minutes ago, HyReZ said: Nope!HSV (hue, saturation, value) is an alternative representations of the RGB color space model, designed in 1978 by a computer graphics researcher Alvy Ray Smith to more closely align with the way human vision perceives color-making attributes.HSV colors can have fractional values represent as decimals You can see references for more nfo. Can you provide the evidence that HSV corresponds with human perception of luminosity/lightness? LAB, XYZ does those by far better, and they're more about human vision than HSV, but they can't be represented in monitors because of the limitations within RGB models. HSV doesn't take into consideration of perceived brightness, and that's what XYZ and its childs address. Edited February 27, 2020 by Reptillian Quote G'MIC Filter Developer Link to comment Share on other sites More sharing options...
HyReZ Posted February 27, 2020 Share Posted February 27, 2020 (edited) I just added a reference to my comment above while you were writing your comment. BTW: I include a reference in my first comment also. Since I don't develop software I have to depend on the published information from those who do and since the thread is about RGB vs HSV I will leave it there with the support that I have provided! Edited February 27, 2020 by HyReZ Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted February 27, 2020 Share Posted February 27, 2020 3 hours ago, Reptillian said: My guess is that this has to do with rounding. This. As RGB != HSV the conversion generates errors. 11 hours ago, Lorenerd11 said: #68B53F had the HSV value of 99, 65, 70. But entering that exact HSV value resulted in #67B23E, which has the HSV value of 98, 65, 69 Don't enter the HSV values. Work with the RGB values. That is what paint.net uses. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
TrevorOutlaw Posted February 27, 2020 Share Posted February 27, 2020 12 hours ago, Lorenerd11 said: #68B53F had the HSV value of 99, 65, 70. But entering that exact HSV value resulted in #67B23E, which has the HSV value of 98, 65, 69 Just for funnies, I looked online for a converter and found one via rapidtables.com, and entered the hex code (#68B53F). The HSV values given was 99, 65.2, 71.0. As you can see, the Values are slightly different from what you have given. Hence, there are rounding errors taking place behind the scene. I believe @toe_head2001 is correct. Also, there tend to be a difference in monitors. Example, I have the iMac and the green color are slightly sharper whereas on the extended monitor using Thunderbolt to HDMI converter, the green color is slightly muted. Quote Paint.NET Gallery | Remove Foreground Object Tutorial | Dispersion Effect Tutorial Link to comment Share on other sites More sharing options...
HyReZ Posted February 28, 2020 Share Posted February 28, 2020 (edited) 2 hours ago, TrevorOutlaw said: Also, there tend to be a difference in monitors. Example, I have the iMac and the green color are slightly sharper whereas on the extended monitor using Thunderbolt to HDMI converter, the green color is slightly muted. For professional work it is recommended to obtain an ICC profile for your monitor and install it using the Windows Color Management option and then calibrating it. Much of the works that I do are large so I use large monitors when I create them. I have a 32 inch monitor for my workstation PC and a 80 inch monitor for my media center PC. Here is a video link on monitor calibration:https://youtu.be/f1PCG5hXUmE Edited February 28, 2020 by HyReZ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.