vaab / colour

Python color representations manipulation library (RGB, HSL, web, ...)
BSD 2-Clause "Simplified" License
319 stars 41 forks source link

Inverted Color #17

Open toabi opened 9 years ago

toabi commented 9 years ago

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

vaab commented 9 years ago

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.

toabi commented 9 years ago

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.

vaab commented 9 years ago

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.

tommilligan commented 8 years ago

See PR #21

ammsa commented 8 years ago

+1