Fix color representation conversion bug