fix color format handling