# RGB and Hex values entered for a color3 result in different color than what was used

**URL:** <https://forum.babylonjs.com/t/rgb-and-hex-values-entered-for-a-color3-result-in-different-color-than-what-was-used/25243>\
**Category:** Questions\
**Created:** [November 13, 2021, 4:47am UTC](https://forum.babylonjs.com/t/rgb-and-hex-values-entered-for-a-color3-result-in-different-color-than-what-was-used/25243 "2021-11-13T04:47:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![inteja](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/inteja/32/22553_2.png) [@inteja](https://forum.babylonjs.com/u/inteja)\
**Post date:** [November 13, 2021, 4:58am UTC](https://forum.babylonjs.com/t/rgb-and-hex-values-entered-for-a-color3-result-in-different-color-than-what-was-used/25243/2 "2021-11-13T04:58:52Z")

</div>

You need to convert to linear space as best explained by @Evgeni_Popov here: [PBRMaterial Albedo Color RGB in Playground Code Different than RGB Shown in Inspector and on Object - #5 by Evgeni\_Popov](https://forum.babylonjs.com/t/pbrmaterial-albedo-color-rgb-in-playground-code-different-than-rgb-shown-in-inspector-and-on-object/9675/5)

---

_[View the full topic](https://forum.babylonjs.com/t/rgb-and-hex-values-entered-for-a-color3-result-in-different-color-than-what-was-used/25243)._
