 
     // Calculate dummy blue gradient sky color
     vec3 high_noon_color = vec3((theta / PI)-0.2,(theta / PI)-0.1,1.0);
-    color = high_noon_color;
-    color = sunset_color / 255;
+    sunset_color = sunset_color / 255;
+    vec3 nightblue_color = vec3 (0.0, 0.0, 41.0) / 255;
+
+    float nighttime = -0.2;
+    float sunrise_start = 0.0;
+    float sunset_start = -0.15;
+    float high_noon_start = 0.3;
+
+    float sun_z = normalize(u_sun_pos).z;
+    float sun_x = normalize(u_sun_pos).x;
+
+    float sun_start;
+
+    if (sun_x > 0) {
+        sun_start = sunrise_start;
+    } else {
+        sun_start = sunset_start;
+    }
+
+    if (sun_z < nighttime) {
+        color = nightblue_color;
+    } else if (sun_z > nighttime && sun_z < sun_start) {
+        float size = sun_start - nighttime;
+        float diff = sun_z - nighttime;
+        float percent= diff/size;
+        color = (nightblue_color + (sunset_color - nightblue_color) * percent);
+    } else if (sun_z > sun_start && sun_z < high_noon_start) {
+        float size = high_noon_start - sun_start;
+        float diff = sun_z - sun_start;
+        float percent= diff/size;
+        color = (sunset_color + (high_noon_color - sunset_color) * percent);
+    } else if (sun_z > high_noon_start) {
+        color = high_noon_color;
+    }
+
+
+
 }


    float z = unit_vector.z;

    // float upperblue = 1.0;
    // float blue = 0.859;
    // float lightblue = 0.659;
    // float dirtyblue = 0.416;
    // float dirtyyellow = 0.219;
    // float yellow = 0.106;
    // float red = 0.0;
    // float bottomred = -0.1;
    // float black = -1.0;

    float upperblue = 1.0;
    float blue = 0.729;
    float lightblue = 0.459;


    vec3 upperblue_color = vec3 (12.0, 43.0, 80.0);
    vec3 blue_color = vec3 (22.0, 77.0, 142.0);
    vec3 lightblue_color = vec3 (62.0, 134.0, 142.0);
    vec3 dirtyblue_color = vec3 (105.0, 142.0, 137.0);
    vec3 dirtyyellow_color = vec3 (170.0, 142.0, 85.0);
