-
Notifications
You must be signed in to change notification settings - Fork 1
Parsing HTML and CSS color values
License
ext/pyhtmlcolor
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
The htmlcolor module parses HTML/CSS colors. It accepts regular hexadecimal
notation, CSS shorthand notation and named colors. In addition it also supports
four-component colors such as RGBA.
>>> import htmlcolor
>>> parser = htmlcolor.Parser()
>>> parser.parse('#ff7700')
(255, 119, 0)
>>> parser.parse('#f70')
(255, 119, 0)
>>> parser.parse('hotpink')
(255, 105, 180)
>>> parser.parse('ff7700')
(255, 119, 0)
About
Parsing HTML and CSS color values
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published