Sign in to follow this  
Chief_Voyager

converting RGB values to hex

Recommended Posts

0 in ints is equivalent 00 hex, 16 int == f hex, 255 int == ff hex. you can enter the value in int you want in hex the windows calculator and click the numeric type to hex and it will change it for you :) hope that helps, Klaus.

Share this post


Link to post
Share on other sites
RGB value hold 3 bytes, one for Red, one for Green and one for Blue component of the color. To help with the hex 0 is 00 and 255 is FF.
Some examples:

RGB(255, 0, 0) = $0000FF. // full red, FF-> indicates 255 in red

RGB(0, 255, 0) = $00FF00. // full green, FF-> indicates 255 in green

RGB(0, 0, 255) = $FF0000. // full blue, FF-> indicates 255 in blue

RGB(128, 128, 0) = $008080

etc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this