create colorspace.h and use it where appropriate