testing the toRGB method