Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
32 bit color map
#11
I think this might be pretty close to what you want. It requires a little more tweaking to get the main color just right. (I'm not sure the best algo for adjusting the "fade" from one color range to the next to make a smooth blend).

Code:
option explicit
dim row as long, col as long
screen 18, 32
'  make a 256x256 color selector image
for col = 0 to 255
  for row = 0 to 255
    if col <= 32 then
      '  blue fade to red
      pset(col, row), rgb(row, 0, (32 - col) * 8)
    elseif col <= 64 then
      '  red to green fade
      pset(col, row), rgb(row, (col - 33) * 8, 0)
    elseif col <= 96 then
      '  green to blue fade
      pset(col, row), rgb(0 , (96 - col) * 8, row)
    end if
  next row
next col
sleep
end
ature has its way of warning a person away from danger: The distinct black and white coloration on a skunk, the chilling buzz of a rattlesanke, a redneck handing you his beer and saying "Watch this!"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)