operator unary- method
Color Inversion Operator
Invert the red, green, and blue channels of a Color
, maintaining
alpha, by subtracting each of its components from the
maximum value for a component, 255
or 0xFF
; such as:
R=50 => 255-50=205, G=100 => 255-100=155, B=200 => 255-200=55
RGB(50,100,200) => RGB(205,155,55)
Implementation
Color operator -() =>
Color.fromARGB(alpha, 0xFF - red, 0xFF - green, 0xFF - blue);