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

Make "Pick Color"'s result less precise, keep only 3 decimals #89630

Merged
merged 1 commit into from
May 22, 2024

Conversation

jsjtxietian
Copy link
Contributor

@jsjtxietian jsjtxietian commented Mar 18, 2024

This fixes half of #89354 , the other half I did not observe the problem yet.

The number of decimals is arbitrary, but I suppose 2-3 should be enough.

@jsjtxietian jsjtxietian requested a review from a team as a code owner March 18, 2024 04:53
@YeldhamDev YeldhamDev added this to the 4.3 milestone Mar 18, 2024
@jsjtxietian jsjtxietian changed the title Make "Pick Color"'s result less precise, keep only 2 demicals Make "Pick Color"'s result less precise, keep only 2 decimals Mar 18, 2024
Copy link
Contributor

@MewPurPur MewPurPur left a comment

Choose a reason for hiding this comment

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

Title of the issue could also be renamed as now it's 3 places.

@jsjtxietian jsjtxietian changed the title Make "Pick Color"'s result less precise, keep only 2 decimals Make "Pick Color"'s result less precise, keep only 3 decimals Mar 18, 2024
@ajreckof
Copy link
Member

ajreckof commented Apr 14, 2024

Capture d’écran 2024-04-14 à 15 20 00

I'm wondering if this should not use the value inside the Hex value it already truncate to 3 decimals and moreover this would enable switching between hex and float values.

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally (rebased on top of master 2149682), it works as expected.

Rounding to 3 decimals is sufficient to represent any 32-bit color (e.g. in the form of #rrggbbaa), so it's fine.

@akien-mga akien-mga merged commit e34b973 into godotengine:master May 22, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@jsjtxietian jsjtxietian deleted the pick-color branch May 22, 2024 07:34
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.

8 participants