Converting values to color levels