# The best way to match fog color with Sky shader example?

**URL:** <https://discourse.threejs.org/t/the-best-way-to-match-fog-color-with-sky-shader-example/32789>\
**Category:** Questions\
**Tags:** materials\
**Created:** [December 18, 2021, 3:18am UTC](https://discourse.threejs.org/t/the-best-way-to-match-fog-color-with-sky-shader-example/32789 "2021-12-18T03:18:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![doughyparker](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/doughyparker/32/17466_2.png) [@doughyparker](https://discourse.threejs.org/u/doughyparker)\
**Post date:** [December 18, 2021, 3:18am UTC](https://discourse.threejs.org/t/the-best-way-to-match-fog-color-with-sky-shader-example/32789/1 "2021-12-18T03:18:31Z")

</div>

I am building a scene based on [Sky](https://github.com/mrdoob/three.js/blob/2e17ddbacb5b4e994f59b418b1b82f1b1b15943c/examples/js/objects/Sky.js) object included in Three.js.

and I am trying to dynamically apply fog colour corresponding to Sky object’s ground colour. However, since Sky object uses shader material I am not sure how to extract the color value from it. I was looking up if it is possible to export the pixel values of the fragment shader then send them to the Scene object.

Any ideas? I appreciate your help!
