colour icon indicating copy to clipboard operation
colour copied to clipboard

HSV support

Open themiurgo opened this issue 9 years ago • 6 comments

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

Thank you.

themiurgo avatar May 19 '15 17:05 themiurgo

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

themiurgo avatar Jun 29 '15 14:06 themiurgo

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.

vaab avatar Jun 29 '15 14:06 vaab

Bump.

pradyunsg avatar Sep 30 '15 06:09 pradyunsg

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.

tommilligan avatar Oct 19 '15 14:10 tommilligan

I propose a:

  • color.hsv_saturation
  • color.hsl_saturation

While keeping

  • color.saturation a synonym for backwards compatibility.

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

vaab avatar Nov 05 '15 17:11 vaab

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)

rachmadaniHaryono avatar Dec 01 '18 04:12 rachmadaniHaryono