Making RGB colour in Xcode

I remember when I first tried using the colour directly from photoshop into my project the colours were appearing whitish while it was yellowish in photoshop the colour value was Color-R-160, G-97, B-5. though very basic but somehow I could not take into account that I need to give a value between 0 and 1.0. Proper way of using rgb code in swift will be

UIColor(red: 160/255.0, green: 97.0/255.0, blue: 5.0/255.0, alpha: 1.0)

Most of the time we keep getting colour values in HEX so I have created a simple tool for creating swift UIColor code from RGB or hex values


A pat on the back !!