ahhhhhhh I think I will commit Hari Kiri
edit_it:
if mouseclick()=1
pointerx = mousex()
pointery = mousey()
addr = ((pointerx + (pointery*200))*4)+12
value1 = get memblock ptr(1)
oddf = peekS(value1,addr)
johnr = FMT_RGB(oddf,ClrRed)
johng = FMT_RGB(oddf,ClrGreen)
johnb = FMT_RGB(oddf,ClrBlue)
set cursor 320,240 : print oddf
set cursor 320,260 : print johnr
set cursor 320,280 : print johng
set cursor 320,300 : print johnb
endif
return
function FMT_RGB( wColour as word, intType as byte )
`// private declarations
local intReturn as word
local Y as word
local Cb as word
local Cr as word
`// grab either the Red, Green or Blue Element based on type
if intType = ClrRed then intReturn = Y + 1.402 * ( Cr - 128 )
if intType = ClrGreen then intReturn = Y - 0.34414 * ( Cb - 128 ) - 0.71414 * ( Cr - 128 )
if intType = ClrBlue then intReturn = Y + 1.772 * ( Cb - 128 )
endfunction intReturn
and ideas people?