<div dir="ltr">+1. Let's keep colorsys then.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 21, 2019 at 7:41 AM Petr Viktorin <<a href="mailto:encukou@gmail.com">encukou@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 5/21/19 12:06 PM, Christian Heimes wrote:<br>
> On 21/05/2019 11.49, Nathaniel Smith wrote:<br>
>> On Tue, May 21, 2019 at 2:40 AM Walter Dörwald <<a href="mailto:walter@livinglogic.de" target="_blank">walter@livinglogic.de</a>> wrote:<br>
>>><br>
>>> On 20 May 2019, at 22:15, Christian Heimes wrote:<br>
>>><br>
>>>> Hi,<br>
>>>><br>
>>>> here is the first version of my PEP 594 to deprecate and eventually<br>
>>>> remove modules from the standard library. The PEP started last year<br>
>>>> with talk during the Python Language Summit 2018,<br>
>>>> <a href="https://lwn.net/Articles/755229/" rel="noreferrer" target="_blank">https://lwn.net/Articles/755229/</a>.<br>
>>>><br>
>>>> [...]<br>
>>>><br>
>>>> colorsys<br>
>>>> ~~~~~~~~<br>
>>>><br>
>>>> The `colorsys <<a href="https://docs.python.org/3/library/colorsys.html" rel="noreferrer" target="_blank">https://docs.python.org/3/library/colorsys.html</a>>`_<br>
>>>> module<br>
>>>> defines color conversion functions between RGB, YIQ, HSL, and HSV<br>
>>>> coordinate<br>
>>>> systems. The Pillow library provides much faster conversation between<br>
>>>> color systems.<br>
>>>><br>
>>>> Module type<br>
>>>>    pure Python<br>
>>>> Deprecated in<br>
>>>>    3.8<br>
>>>> To be removed in<br>
>>>>    3.10<br>
>>>> Substitute<br>
>>>>    `Pillow <<a href="https://pypi.org/project/Pillow/" rel="noreferrer" target="_blank">https://pypi.org/project/Pillow/</a>>`_,<br>
>>>>    `colorspacious <<a href="https://pypi.org/project/colorspacious/" rel="noreferrer" target="_blank">https://pypi.org/project/colorspacious/</a>>`_<br>
>>><br>
>>> I'm using colorsys constantly as the basis for a tool that converts CSS<br>
>>> colors between different coordinate systems. I don't see how that could<br>
>>> be done via Pillow (which AFAICT only converts complete images).<br>
>>> RGB<->HSV<->HLS conversion seems to be not available (or not obvious) in<br>
>>> colorspacious.<br>
>><br>
>> Correct, colorspacious doesn't support HSV or HLS. I suppose it would<br>
>> be trivial enough to add...<br>
>><br>
>> The 'colour' package has them (along with everything else you can<br>
>> dream of): <a href="https://colour.readthedocs.io/en/latest/colour.models.html" rel="noreferrer" target="_blank">https://colour.readthedocs.io/en/latest/colour.models.html</a><br>
> <br>
> Nice catch, I just added <a href="https://python-colormath.readthedocs.io/en/latest/" rel="noreferrer" target="_blank">https://python-colormath.readthedocs.io/en/latest/</a> to my update PR. I'll add colour to the list, too.<br>
> <br>
> (It didn't pop up on my radar because I wasn't checking for British spelling)<br>
> <br>
> Christian<br>
<br>
<br>
Please, don't remove colorsys. HSL and HSV aren't outdated, and AFAIK, <br>
the module is not a maintenance burden.<br>
<br>
The packages on PyPI offer more advanced models. Perhaps they could be <br>
linked in the documentation, if we want to endorse them. But just as <br>
we're not removing `array` in favor of `numpy`, we shouldn't remove <br>
colorsys either. Colorsys is not dead, it's just small.<br>
<br>
I assume one of the reasons colorspacious doesn't support HSV or HLS is <br>
that HSV/HLS tends to be used for quite different purposes than the more <br>
fancy color spaces. You'd use HSL/HSV for a simple color picker or a <br>
saturation shift on a web page, GUI or game (where you don't have <br>
*exact* colors anyway); things like sRGB or CIELab are for color <br>
management, photos, printing, etc.<br>
<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" rel="noreferrer" target="_blank">https://mail.python.org/mailman/options/python-dev/guido%40python.org</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div><div><i style="font-family:Arial,Helvetica,sans-serif;font-size:small;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);color:rgb(136,136,136)"><span>Pronouns</span>: he/him/his </i><a href="http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/" style="color:rgb(17,85,204);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)" target="_blank"><i>(why is my <span>pronoun</span> here?)</i></a></div></div></div>