I know a formula to convert a colour to its RGB. Eg.
Color c=new Color(100,100,100);
Int rgb1= c.getRed()*65536+c.getGreen()*256+c.getBlue();
This is how we get single RGB value.
Using java programming
int rgb2=c.getRGB();
when I compare this two rgb1 and rgb2, they show a different value. What's wrong in my first equation. Please kindly solve my problem. Thanks