SkyShader example. How to change colors?

I am using the sky shader shown here: https://threejs.org/examples/webgl_shaders_sky.html

I can’t for the life of me, figure out how to change the color gradient. The golden sky is gorgeous. But I would like to be able to shift it to more blue, purple, etc. And tweaking the values in the shader seems to have no effect. Has anyone had any luck with this?

I figured it out, sort of… In case anyone can benefit from this. I am really dumb at math. But I discovered that it is calculating light ABSORPTION from the atmosphere, not the RGB value of the light.

I changed it slightly to get what I was looking for. It is fading from a dark cyan, to golden sun (Like the Robots of Dawn book cover)

//Line 60'ish....

//'const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 );', // <--old

'const vec3 totalRayleigh = vec3( 2.804542996261093E-6, 1.3562911419845635E-5, 5.0265902468824876E-5 );',


//'const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 );',  // <--old

'const vec3 MieConst = vec3( 5.8399918514433978E14, 2.7798023919660528E14, 1.0790479543861094E14 );',
1 Like