-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hue wheel colors are wrong #5200
Comments
Thanks for reporting
Fixes would be welcome. |
I changed the corresponding 7 lines above to the lines below:
and that seemed to fix the issue, the preview color matches the triangle. However this seems too simple, is there something I'm missing? Why is the current code blending two triangles? |
@jamesthomasgriffin looks like your version is correct. At least as far as Gimp is concerned. I did a test:
We end up with two colors, a color picked by Gimp color picker and a color selected by Dear ImGui color picker. Depending on where i click i am consistently getting about 20-30 color difference for two of RGB components. Version proposed by @jamesthomasgriffin produces difference of 1 in two-three RGB components. tl;dr; New proposed version produces a triangle where clicked color is a lot closer to color actually produced by the picker. |
@rokups thank you for doing that test. I think my version is correct, however there may be something I'm overlooking with alpha channels / transparency. (I believe you've also shown that Gimp is incorrect(!) because it should be using SRGB and I don't think ImGui does by default.) |
Dear ImGui does not support SRGB in any way so far.. Your comment prompted me to compare Gimp to Krita. Sampled color and picked color of these two programs differs by 1-2, which is pretty close. While i am not familiar with color theory and peculiarities of color pickers, i suppose drawing application authors should know what they are doing. Krita especially, since it is geared towards drawing. Considering no SRGB support at this time, we probably should adopt your solution. |
Merged as 9ac94ff, thank you all ! |
Version/Branch of Dear ImGui:
Version: Dear ImGui 1.87 (18700)
Branch: master
Back-end/Renderer/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Operating System: Windows 11
My Question:
Hue wheel color picker colors doesn't seem right.
Screenshots
How you can see selected color has 0 saturation but on triangle it has some
Isn't it supposed to look more like this, where triangle gradually loses saturation?
The text was updated successfully, but these errors were encountered: