# HemisphereLight change colors automatically. Why?

**URL:** <https://discourse.threejs.org/t/hemispherelight-change-colors-automatically-why/56623>\
**Category:** Questions\
**Tags:** lights\
**Created:** [October 3, 2023, 6:28pm UTC](https://discourse.threejs.org/t/hemispherelight-change-colors-automatically-why/56623 "2023-10-03T18:28:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [October 3, 2023, 10:26pm UTC](https://discourse.threejs.org/t/hemispherelight-change-colors-automatically-why/56623/2 "2023-10-03T22:26:13Z")

</div>

This is likely a color space issue — most color pickers are not color managed, and you’ll need to assume their data is sRGB. Something like this should fix it:

```js
const params = { color: hemiLight.color.getHex() };

gui.addColor(params, 'color').onChange((hex) => {
  hemiLight.color.setHex(hex);
});

```

This works because three.js assumes that hexadecimal and CSS-string colors are sRGB by default. Other methods of getting/setting a color assume the color space used for rendering (Linear sRGB), and you’d need to specify if they’re anything else.

More details:

- [THREE.Color documentation](https://threejs.org/docs/?q=color#api/en/math/Color)
- [Updates to Color Management in three.js r152](https://discourse.threejs.org/t/updates-to-color-management-in-three-js-r152/50791)

---

_[View the full topic](https://discourse.threejs.org/t/hemispherelight-change-colors-automatically-why/56623)._
