sty
sty copied to clipboard
HTML colors support
I know it can be converted somehow, but please introduce HTML colors conversion support if possible.
from sty import HTMLfg, fg
# CSS "red"
# HEX "#FF0000"
# RGB (255, 0, 0)
print(HTMLfg(0xFF0000) + "Red")
# CSS —
# HEX "#A0A0A0"
# RGB (160, 160, 160)
print(HTMLfg("#A0A0A0") + "Gray")
# CSS "white"
# HEX "#FFFFFF"
# RGB (255, 255, 255)
print(HTMLfg("#FFF") + "White")
# CSS "orange"
# HEX "#FFA500"
# RGB (255, 165, 0)
print(HTMLfg("orange") + "Orange")
print(fg.rs)
This looks interesting!
I think I'll add HtmlFg and HtmlBg after v1.0.0 was released.