I've seen a function like this laying around somewhere, but I forgot where it was. This function creates a single pixel image of the color you want it to be, useful for changing the color of an object (color object just changes the... I think the diffuse color of the object. Not the texture anyways) for a stronger and clearer color. If you're texturing an object and you want it to look reddish, use color object. Otherwise, you're best off using a single pixel image.
PxImg(1,rgb(255,255,0))
PxImg(2,rgb(255,0,0))
pxImg(3,rgb(0,0,255))
for n=0 to 1000
paste image 1,rnd(screen width()),rnd(screen height())
paste image 2,rnd(screen width()),rnd(screen height())
paste image 3,rnd(screen width()),rnd(screen height())
next n
sync
wait key
end
function PxImg(image as integer, color as dword)
n=findFreeMemblock()
make memblock n,16
write memblock dword n,0,1
write memblock dword n,4,1
write memblock dword n,8,32
write memblock dword n,12,color
make image from memblock image,n
delete memblock n
endfunction
function findFreeMemblock()
for i = 1 to 255
if memblock exist(i) = 0
exitfunction i
endif
next i
endfunction 0