added rgbToColor() method