Skip to content

Conversation

@puxiao
Copy link
Contributor

@puxiao puxiao commented Apr 21, 2021

Related issue: null


Description

I think it's a bad experience.

const material = new Three.MeshPhongMaterial({ 
	color: 'Red'
})

⚠️warn: THREE.Color: Unknown color Red


So...

-	const hex = _colorKeywords[ style ];
+	const hex = _colorKeywords[ style.toLowerCase() ];

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 21, 2021

In this case, then end of the following sentence in the documentation can be removed.

Note that for X11 color names, multiple words such as Dark Orange become the string 'darkorange' (all lowercase).

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 21, 2021

@puxiao I've meant to just delete (all lowercase), not the entire sentence^^.

@mrdoob mrdoob added this to the r128 milestone Apr 21, 2021
@puxiao
Copy link
Contributor Author

puxiao commented Apr 21, 2021

Oops... Do I need to recover?

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 21, 2021

Yes, that would be good. And then just remove (all lowercase).

@mrdoob mrdoob merged commit d376e10 into mrdoob:dev Apr 21, 2021
@mrdoob
Copy link
Owner

mrdoob commented Apr 21, 2021

Thanks!

@puxiao puxiao deleted the patch-1 branch April 21, 2021 09:53
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.

3 participants