godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.86k stars 20.15k forks source link

Color picker changes hue when changing value #65701

Open QbieShay opened 2 years ago

QbieShay commented 2 years ago

Godot version

v4.0.alpha.custom_build [fefa3e941]

System information

Linux Fedora, Radeon RX 590

Issue description

Color picker can change the hue of a color when changing the value on the visual bar.

https://user-images.githubusercontent.com/7917475/189674520-0e0041c0-6985-4297-bfc3-e3f2ac24ac2e.mp4

Notice how the color jumps here: Screenshot from 2022-09-12 15-57-16 Screenshot from 2022-09-12 15-57-22

Steps to reproduce

Use the color picker, set hue to dark magenta, drag the value slider on the side of the circle.

Minimal reproduction project

No response

fire commented 2 years ago

Created some videos for Qbieshay with Krita and Godot Engine. The Krita shows the "HSV circle" in regular and in lab space. The Godot Engine video show the preferred workflow I designed using OKHSL.

https://user-images.githubusercontent.com/32321/189914618-310ea533-1153-4564-a503-43615b5d63e0.mov

https://user-images.githubusercontent.com/32321/189914751-f202e3de-3d59-4f73-8905-2814d4f6afad.mov

https://user-images.githubusercontent.com/32321/189914809-ce2f5a78-077c-47d9-86d1-ab539f9f211e.mov

fire commented 1 year ago

Does this pr help? https://github.com/godotengine/godot/pull/67534

lostminds commented 1 year ago

Could maybe be related to #68286 issue (seems like the wheel preview is rendering HSL colors for HSV values)

kerstop commented 2 weeks ago

I think this is actually behaving as intended. in the original video the color wheel is in the OKHSL mode which uses the Oklab color space. The vertical bar on the right is not being passed into an hsv function but the L parameter of oklab. On this site if you change the L parameter you can see that it can effect the available hues.

While I couldn't find a color picker that demonstrated the same wiggling, if you compare the difference between oklab(10%,50%,50%) and oklab(5%,50%,50%) on this converter website you can see that changing the L parameter also changes the hue there too.