Invert a color with Bitwise.OnesComplement?

I want to invert a color, and I’m making some dumb mistake. Can anyone tell me why this doesn’t work?

// start with some color dim v as variant = g.ForeColor // invert it v = Bitwise.OnesComplement( v ) g.ForeColor = v.ColorValue // and it doesn't work

define “doesnt work” ?

seems to work just fine for me… but remember that it also inverts the ALPHA value… which might make your result transparent.

Thanks Dave, that was the problem :slight_smile: