Add color mapping and resolve mistake with calculating scale factors