Qbasicnews.com
September 15, 2019, 11:18:04 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: color -> HEX  (Read 3308 times)
Diroga
Been there, done that
*****
Posts: 1087


« on: February 17, 2004, 11:24:23 PM »

make a  program that displays a color pallet(16 bit) and gives the hex value for selected colors.
Logged
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #1 on: February 19, 2004, 12:24:04 AM »

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.. :|
Logged

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.
Diroga
Been there, done that
*****
Posts: 1087


« Reply #2 on: February 19, 2004, 01:45:28 AM »

Quote from: "Agamemnus"

Sounds easy but boring.. :|


i cnat figuer it out
Logged
Rokkuman
Na_th_an
*****
Posts: 1973



« Reply #3 on: February 19, 2004, 12:08:35 PM »

Quote from: "Diroga"
Quote from: "Agamemnus"

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...
Logged
SCM
Wandering Guru
***
Posts: 311



« Reply #4 on: February 19, 2004, 10:34:58 PM »

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.
Logged

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)
Neo
Na_th_an
*****
Posts: 2150



« Reply #5 on: February 20, 2004, 09:07:57 AM »

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
Logged
Diroga
Been there, done that
*****
Posts: 1087


« Reply #6 on: February 20, 2004, 09:21:47 PM »

yeah i thought of that after i posted it. so move thread plz or delete this one
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!