Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
color -> HEX
#1
make a program that displays a color pallet(16 bit) and gives the hex value for selected colors.
Reply
#2
Quote:make a program that displays a color pallet(16 bit) and gives the hex value for selected colors.

So it displays a pallette and you can select one or more colors which then gives its hex value. Would be nice to change the palette too..

Sounds easy but boring.. :|
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#3
Quote:Sounds easy but boring.. :|

i cnat figuer it out
Reply
#4
Quote:
Agamemnus Wrote:Sounds easy but boring.. :|

i cnat figuer it out

[offtopic] I'm sorry, but I'd just like to let everyone know that I have saved this post....... just so I can look at it whenever I want.[/offtopic]

-----------------------

I'm not sure if you can find the HEX of it, unless the hex and the RGB value is the same thing...
Reply
#5
Rockuman,
The color value for the palette is R + 256 * G + 256^2 * B. To get the hex value, you can use HEX$. One way would be
Code:
HexVal$ = "&H" + HEX$((256& * B + G) * 256 + R)   ' Notice the first 256 is a long
This isn't meant answer Diroga challenge, just Rockuman's question.
hrist Jesus came into the world to save sinners, of whom I am first.(I Timothy 1:15)

For God so loved the world, that He gave His only begotten Son,
that whoever believes in Him should not perish, but have eternal life.(John 3:16)
Reply
#6
In general about challenges, please challenge other users to a subject you know about. I mean, this topic could've been placed in 'Programming Help' with the title '24-Bit colours?' as well. If you have a question about something, post it in the Help Fora Wink
Reply
#7
yeah i thought of that after i posted it. so move thread plz or delete this one
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)