added convertrgbTocolorObj method