Skip to content
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

Keep Hue value when Saturation or Value is zero #46230

Merged
merged 1 commit into from
Feb 21, 2021

Conversation

gongpha
Copy link
Contributor

@gongpha gongpha commented Feb 19, 2021

In ColorPicker, when Saturation or Value slider is zero, The UV and W box is reset to red. And the hue slider won't work.

output

This happened when color was set from sliders. Then the UV and W boxes need to update after the color changes. The received new HSV values are converted from the new RGB color. If R == G == B (Gray), The original hue value is lost.

This PR updating HSV from slider values directly to avoid to lost the original hue value.

output2

Should help solve some bug in #46110.

@gongpha gongpha requested a review from a team as a code owner February 19, 2021 17:17
@Calinou Calinou added cherrypick:3.x Considered for cherry-picking into a future 3.x release enhancement topic:gui usability labels Feb 19, 2021
@Calinou Calinou added this to the 4.0 milestone Feb 19, 2021
@akien-mga akien-mga merged commit 14f6f92 into godotengine:master Feb 21, 2021
@akien-mga
Copy link
Member

Thanks!

@gongpha gongpha deleted the keep-hue-value branch February 22, 2021 05:55
@akien-mga
Copy link
Member

Cherry-picked for 3.2.4.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants