Factor out color transfer functions into utils