• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to convert hexadecimal value in int value

 
Aayush Patel
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to make color through hexadecimal value....can anybody help me...means i want color through hexadecimal value which is passed in applet code.....
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Aayush,
Just use the Color( int rgb ) constructor.
0x 0000 0000 00RR GGBB
where R = red, G = green, and B = blue.
Examples:
Hex Number Decimal Value
0x0000000000FFFFFF 16777215
0x0000000000888888 8947848
0x0000000000000000 0
Regards,
Manfred.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic