colour icon indicating copy to clipboard operation
colour copied to clipboard

Inverted Color

Open toabi opened this issue 10 years ago • 5 comments

It would be cool to have an .inverted property which would return an inverted Color object.

toabi avatar Jun 11 '15 15:06 toabi

Nice suggestion, which type of "inversion" where you thinking of ? (a +0.5 in Hue ? and inversion of luminance ?) ... Please share if you have some ideas on this topic.

vaab avatar Jun 11 '15 15:06 vaab

Intuitively I just thought about simple RGB-negative as in (255-{R,G,B}). .invert(using='hurr?') smells a bit enterprisey, but may also be an option if there many useful ways.

toabi avatar Jun 11 '15 15:06 toabi

http://www.quora.com/Whats-the-algorithm-for-obtaining-a-hexadecimal-colors-opposite-in-the-color-wheel

Gives some nice hints... If you want to give it a try for simple .invert() with the simplest way to do an invert, I would probably accept your merge. Otherwise it'll have to wait a little.

vaab avatar Jun 11 '15 15:06 vaab

See PR #21

tommilligan avatar Oct 13 '15 13:10 tommilligan

+1

ammsa avatar Dec 22 '15 00:12 ammsa