aboutsummaryrefslogtreecommitdiff
path: root/gn
diff options
context:
space:
mode:
Diffstat (limited to 'gn')
-rw-r--r--gn/packages/python.scm39
1 files changed, 39 insertions, 0 deletions
diff --git a/gn/packages/python.scm b/gn/packages/python.scm
index d14518d..f09e1bb 100644
--- a/gn/packages/python.scm
+++ b/gn/packages/python.scm
@@ -1861,3 +1861,42 @@ window to get to RStudio for example.")
"This extension adds a toolbar overlay to Flask applications containing
useful information for debugging.")
(license license:bsd-3)))
+
+(define-public python-webcolors
+ (package
+ (name "python-webcolors")
+ (version "1.11.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "webcolors" version))
+ (sha256
+ (base32 "1rkda75h2p65zx6r84c9mjavn4xpviqvqrklvdvcklapd5in1wvn"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest")))))))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (home-page "https://github.com/ubernostrum/webcolors")
+ (synopsis "HTML/CSS color definitions library")
+ (description "@code{python-webcolors} is a module for working with
+HTML/CSS color definitions. Normalizing and converting between the following
+formats is supported.
+
+@itemize
+@item Specification-defined color names
+@item Six-digit hexadecimal
+@item Three-digit hexadecimal
+@item Integer rgb() triplet
+@item Percentage rgb() triplet
+@end itemize
+
+Only the RGB colorspace is supported. Conversion to/from the HSL colorspace
+can be handled by the @code{colorsys} module in the Python standard library.")
+ (license license:bsd-3)))