You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Besides #-notation and RGB, could rich also support HSL color representation, or am I missing something? I realize this can trivially be done externally with import colorsys, but it should be possible to support something like
console.print("Hello", style="hsl(128,50%,20%)")
I would love to contribute a PR for this, unless of course there is a reason why this is not in scope. As far as I can gather, this only requires changes to color.py, specifically a new constructor .from_hsl() here:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Besides #-notation and RGB, could rich also support HSL color representation, or am I missing something? I realize this can trivially be done externally with
import colorsys
, but it should be possible to support something likeI would love to contribute a PR for this, unless of course there is a reason why this is not in scope. As far as I can gather, this only requires changes to
color.py
, specifically a new constructor.from_hsl()
here:rich/rich/color.py
Line 421 in 076e0d2
and to the RE_COLOR regex.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions