I just added a proper color pallete system, which fixed all the shading errors. At the moment it only includes 4 reds, 4 blues and 4 greens, but i'll add more soon.
If you want to see an example i've updated the pictures of the sphere render in the OP to the new version.