It's better to use a thresholds when comparing colours. As the type of display mode your application is running in will effect the results POINT() returns.
Ex (PlayBasic Example Code)
Do
cls 0
CircleC 100,100,50,true,Rgb(255,0,0)
CircleC 200,100,50,true,Rgb(0,255,0)
CircleC 300,100,50,true,Rgb(0,0,255)
CircleC 100,200,50,true,Rgb(155,100,0)
CircleC 200,200,50,true,Rgb(0,255,233)
CircleC 300,200,50,true,Rgb(255,255,255)
result=IsColourRed(Mousex(),Mousey())
if Result=0
Print "No RED at this point"
else
Print "Yep You're Over A Colour that has some Red in it"
endif
Sync
loop
Function IsColourRed(Xpos,Ypos)
; Grab the Pixel
ThisPixel=Point(xpos,Ypos)
; Mask OFF the GREEN + BLUE bits leaving the RED behind
; sp to get red with mask the colour with 16711680 = $ff0000
; the div moves the result down so the result will be 0 to 255
Red = (ThisPixel & 16711680) / 65536
if Red>128
result=1
else
Result=0
endif
EndFunction result