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

Remove spaces from input of HTML color in color picker #79782

Merged
merged 1 commit into from
Jul 24, 2023
Merged

Remove spaces from input of HTML color in color picker #79782

merged 1 commit into from
Jul 24, 2023

Conversation

guemax
Copy link
Contributor

@guemax guemax commented Jul 22, 2023

The color picker is now much more liberal about the user input, and simply removes the spaces before passing the string for further processing. This is especially useful when copy-pasting HTML color codes from color palettes, as there is always the chance of accidentally copying some spaces as well. Having to remove them manually is quite tedious and not as intuitive as it could be.

Accepting valid HTML color codes with spaces is also the default behavior of programs with similar color picker functionality such as Affinity Designer, Blender, or Gimp.

Fixes #79338

Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being liberal with what HTML colours we accept makes this quality of like improvement better.

@YuriSizov YuriSizov merged commit d06779c into godotengine:master Jul 24, 2023
13 checks passed
@YuriSizov
Copy link
Contributor

Thanks! And congrats on your first merged Godot pull request!

@guemax
Copy link
Contributor Author

guemax commented Jul 28, 2023

Thank your very much, it was a great experience!

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.

Allow HTML color codes surrounded by spaces in the color picker
5 participants