implement and test rgb()