@Briarfox I wrote a little test program to show what’s happening. Use the parameter to change values. The parameter value of 1 will show a tall red rectangle. A value of 2 will show a write rectangle. A value of 3 will show both rectangles, with the white over the red. I also show the r,g,b values of a cross section of the rectangle. When it’s red, the 6 values are 255,0,0. When it’s white, the 6 values are 255,255,255 . When it’s white over red, you’ll see that the first and last set of colors isn’t true red or true white, but a mixture.
function setup()
parameter.integer("test",1,3,1)
img=image(300,300)
end
function draw()
background(40,40,50)
if test == 1 or test==3 then
setContext(img)
fill(255,0,0)
rect(100,1,6,200)
setContext()
sprite(img,200,200)
count=0
for x=101,106 do
count = count + 1
r,g,b,a=img:get(x,50)
text(r.." "..g.." "..b,100,HEIGHT-count*20)
end
end
if test==2 or test==3 then
setContext(img)
fill(255)
rect(100,1,6,200)
setContext()
sprite(img,200,200)
count=0
for x=101,106 do
count = count + 1
r,g,b,a=img:get(x,50)
text(r.." "..g.." "..b,300,HEIGHT-count*20)
end
end
end