Possible RGBA bug (all OS's?)
Posted: Wed Oct 01, 2025 8:35 pm
Hello everyone
Tested this code on Ubuntu / Mac and Windows, seems RGBA(255,255,255,255) will result in -1 on
Ubuntu and Mac, while Windows also has this weird anomaly, also check result of all RGBA(0,0,0,0) and the wierd
result of last 19-1 (see column "i") of column "rA"
Can someone else confirm on their systems?
Best regards
Erlend
Tested this code on Ubuntu / Mac and Windows, seems RGBA(255,255,255,255) will result in -1 on
Ubuntu and Mac, while Windows also has this weird anomaly, also check result of all RGBA(0,0,0,0) and the wierd
result of last 19-1 (see column "i") of column "rA"
Can someone else confirm on their systems?
Code: Select all
OpenWindow(0,0,0,500,500,"")
ListIconGadget(0,0,0,400,400,"i",45,#PB_ListIcon_GridLines)
AddGadgetColumn(0,1,"grey",45)
AddGadgetColumn(0,2,"r",45)
AddGadgetColumn(0,3,"g",45)
AddGadgetColumn(0,4,"b",45)
AddGadgetColumn(0,5,"grayA",45)
AddGadgetColumn(0,6,"rA",45)
AddGadgetColumn(0,7,"gA",45)
AddGadgetColumn(0,8,"bA",45)
For i=0 To 255
c=255-i
AddGadgetItem(0,i,Str(c)+""+Chr(10)+""+Chr(10)+""+Chr(10)+"")
SetGadgetItemColor(0,i,#PB_Gadget_BackColor,RGB(c,c,c),1)
SetGadgetItemColor(0,i,#PB_Gadget_BackColor,RGB(c,0,0),2)
SetGadgetItemColor(0,i,#PB_Gadget_BackColor,RGB(0,c,0),3)
SetGadgetItemColor(0,i,#PB_Gadget_BackColor,RGB(0,0,c),4)
SetGadgetItemColor(0,i,#PB_Gadget_BackColor,RGBA(c,c,c,255),5)
SetGadgetItemColor(0,i,#PB_Gadget_BackColor,RGBA(c,0,0,255),6)
SetGadgetItemColor(0,i,#PB_Gadget_BackColor,RGBA(0,c,0,255),7)
SetGadgetItemColor(0,i,#PB_Gadget_BackColor,RGBA(0,0,c,255),8)
Next
Repeat
event=WaitWindowEvent()
Until event=#PB_Event_CloseWindow
Erlend