Color minus Color


I’m trying to reverse a Color(…) so I searched a way and i found :

0 = 255
1 = 254
so to reverse Color(10,35,10) we need to substract Color(255,255,255) to my color and it says : perform arithmetic on field ‘color’.

My code:

draw.RoundedBox(5,0,0,80,80,table.color - Color(255,255,255))

There is no __sub method implemented in the Color object. If you want to reverse it, you’ll have to subtract each element and take the absolute value.