vaab / colour

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

HSV support #16

Open themiurgo opened 9 years ago

themiurgo commented 9 years ago

Is HSV going to be supported? The readme says it is supported, but I found only HSL implemented.

Thank you.

themiurgo commented 9 years ago

In case anyone is looking for HSV support in the meanwhile, the package spectra provides it.

vaab commented 9 years ago

Oups, your question somehow slipped through. HSV is very close to HSL, implementing it could be relatively easily. Why not try to contribute a PR ? I didn't know about spectra, it's indeed very close to colour. Thank you for the information of its existence. I'll do the implementation myself if I have some time.

pradyunsg commented 8 years ago

Bump.

tommilligan commented 8 years ago

I think the only issue with this is that at the moment attributes are intuitively named under HSL - if HSV was implemented, "saturation" would be duplicated and the naming would no longer be intuitive.

vaab commented 8 years ago

I propose a:

While keeping

This could be extended to more attributes for coherence's sake. But I dislike the idea to have it everywhere.

rachmadaniHaryono commented 5 years ago

for anyone who search for hsv support, python have colorsys.rgb_to_hsv, example:

>>> import colorsys
>>> from colour import Color
>>> v = Color(rgb=(1, 0, 0)).rgb
>>> hsv = colorsys.rgb_to_hsv(v[0]/255, v[1]/255, v[2]/255)
(0.0, 1.0, 0.00392156862745098)