Skip to content

HTML colors support #40

@kubinka0505

Description

@kubinka0505

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions