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

Color: Warn more specifically on bad color specification. #25476

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

rotu
Copy link
Contributor

@rotu rotu commented Feb 9, 2023

Description

If you create a color incorrectly, the error is not very general.

Now the "Unknown color ..." message only applies if the color appears to not be a HEX or CSS-function style color.

e.g. new THREE.Color("#ff") previously warned "Unknown color #ee" and now gives "Invalid hex color #ee".

e.g. new THREE.Color("lab(1,1,1)") previously warned "Unknown color lab(1,1,1)" and now warns "Unknown color model lab(1,1,1)"

@rotu rotu changed the title Warn in more cases on bad color specification Warn more specifically on bad color specification Feb 9, 2023
@mrdoob mrdoob added this to the r150 milestone Feb 10, 2023
@mrdoob mrdoob merged commit 7cfd470 into mrdoob:dev Feb 10, 2023
@Mugen87 Mugen87 changed the title Warn more specifically on bad color specification Color: Warn more specifically on bad color specification. Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants