Updated colorize function according new imagine API