Fix RGB conversion