Made the shades better and fixed a bug in luminance_flatten