Merge "Simplify color mode mapping" into tm-dev