2

When I set the color on the material as a Hex String, the mesh is rendered with a color close to what I expect. But when I set it with an instance of THREE.Color(sameHexString), the mesh has a different color.

I have a simplified code that reproduces this: https://codesandbox.io/s/mystifying-wind-qhp99?file=/src/App.js

With linear on the <Canvas> both meshes are rendered with same color, but a different color than the previous 2.

1

1 Answer 1

0

The link to the discussion that @prisoner849 commented described the exact problem. Thanks @prisoner849.

Converting the Color instance solved this problem. For more details follow the discussion.

new THREE.Color(hexString).convertSRGBToLinear()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.