Welcome, Guest. Please login or register.

Author Topic: Any way to tell HEX value of a colour in a bitmap?  (Read 1391 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline SamuraiCrow

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2281
  • Country: us
  • Gender: Male
    • Show all replies
Re: Any way to tell HEX value of a colour in a bitmap?
« on: March 20, 2007, 08:22:39 PM »
If you have a palette entry that uses 0-255 red, 0-255 green, and 0-255 blue, you just divide each number by 16, and set the hexadecimal digit based on that value:  0 through 9 stay the same, 10=a, 11=b, 12=c, 13=d, 14=e, and 15=f.  The remainder of the division process will be the next hex digit, and then you just put the red, green, and blue values together in that order and you've got your hex value.  Any Amiga paint program with a palette editor will be able to tell you the decimal values to convert to hex.