I went ahead and tossed together an example of the method i was referring too. I didn't comment it but it should be fairly easy to understand.
In this example, I made a 'clickmap' that utilizes only the red channel for storing locations. I've setup 4 areas: a red area, a green area, a blue area and also a background area for everything else.
Heres the code and below is an attached rar with images that you can test it with.
` Area Mapping by coldfire
sync on
sync rate 60
set window on
set display mode 512,512,32,1
load image "./colormap.jpg",1,0
load image "./clickmap.png",2,0
create bitmap 1,512,512
paste image 2,0,0
red_area = 127
green_area = 63
blue_area = 255
background = 0
set current bitmap 0
paste image 1,0,0
do
paste image 1,0,0
text$ = ""
set current bitmap 1
if rgbr(point(mousex(),mousey())) = red_area then text$= "Red Area"
if rgbr(point(mousex(),mousey())) = green_area then text$= "Green Area"
if rgbr(point(mousex(),mousey())) = blue_area then text$= "Blue Area"
if rgbr(point(mousex(),mousey())) = background then text$= "Background"
set current bitmap 0
set cursor 0,0
print text$
sync
loop
end
hope it helps!
coldfire
edit: BTW, i saved the clickmap as a png with no compression. I havent tested it but i'd assume that colors may become inaccurate with various compressions.