webcolors


Namewebcolors JSON
Version 1.13 PyPI version JSON
download
home_page
SummaryA library for working with the color formats defined by HTML and CSS.
upload_time2023-03-27 05:52:57
maintainer
docs_urlNone
author
requires_python>=3.7
licenseBSD-3-Clause
keywords color css html web
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. -*-restructuredtext-*-

.. image:: https://github.com/ubernostrum/webcolors/workflows/CI/badge.svg
   :alt: CI status image
   :target: https://github.com/ubernostrum/webcolors/actions?query=workflow%3ACI

``webcolors`` is a module for working with HTML/CSS color definitions.

Support is included for normalizing and converting between the
following formats (RGB colorspace only; conversion to/from HSL can be
handled by the ``colorsys`` module in the Python standard library):

* Specification-defined color names

* Six-digit hexadecimal

* Three-digit hexadecimal

* Integer ``rgb()`` triplet

* Percentage ``rgb()`` triplet

For example:

.. code-block:: python

    >>> import webcolors
    >>> webcolors.hex_to_name("#daa520")
    'goldenrod'

Implementations are also provided for the HTML5 color parsing and
serialization algorithms. For example, parsing the infamous
"chucknorris" string into an rgb() triplet:

.. code-block:: python

    >>> import webcolors
    >>> webcolors.html5_parse_legacy_color("chucknorris")
    HTML5SimpleColor(red=192, green=0, blue=0)

Full documentation is `available online <https://webcolors.readthedocs.io/>`_.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "webcolors",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "color,css,html,web",
    "author": "",
    "author_email": "James Bennett <james@b-list.org>",
    "download_url": "https://files.pythonhosted.org/packages/a1/fb/f95560c6a5d4469d9c49e24cf1b5d4d21ffab5608251c6020a965fb7791c/webcolors-1.13.tar.gz",
    "platform": null,
    "description": ".. -*-restructuredtext-*-\n\n.. image:: https://github.com/ubernostrum/webcolors/workflows/CI/badge.svg\n   :alt: CI status image\n   :target: https://github.com/ubernostrum/webcolors/actions?query=workflow%3ACI\n\n``webcolors`` is a module for working with HTML/CSS color definitions.\n\nSupport is included for normalizing and converting between the\nfollowing formats (RGB colorspace only; conversion to/from HSL can be\nhandled by the ``colorsys`` module in the Python standard library):\n\n* Specification-defined color names\n\n* Six-digit hexadecimal\n\n* Three-digit hexadecimal\n\n* Integer ``rgb()`` triplet\n\n* Percentage ``rgb()`` triplet\n\nFor example:\n\n.. code-block:: python\n\n    >>> import webcolors\n    >>> webcolors.hex_to_name(\"#daa520\")\n    'goldenrod'\n\nImplementations are also provided for the HTML5 color parsing and\nserialization algorithms. For example, parsing the infamous\n\"chucknorris\" string into an rgb() triplet:\n\n.. code-block:: python\n\n    >>> import webcolors\n    >>> webcolors.html5_parse_legacy_color(\"chucknorris\")\n    HTML5SimpleColor(red=192, green=0, blue=0)\n\nFull documentation is `available online <https://webcolors.readthedocs.io/>`_.\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "A library for working with the color formats defined by HTML and CSS.",
    "version": "1.13",
    "split_keywords": [
        "color",
        "css",
        "html",
        "web"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d5e13e9013159b4cbb71df9bd7611cbf90dc2c621c8aeeb677fc41dad72f2261",
                "md5": "d9e9ac7c1da7a2b18975265cf0a953ac",
                "sha256": "29bc7e8752c0a1bd4a1f03c14d6e6a72e93d82193738fa860cbff59d0fcc11bf"
            },
            "downloads": -1,
            "filename": "webcolors-1.13-py3-none-any.whl",
            "has_sig": true,
            "md5_digest": "d9e9ac7c1da7a2b18975265cf0a953ac",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 14360,
            "upload_time": "2023-03-27T05:52:55",
            "upload_time_iso_8601": "2023-03-27T05:52:55.468836Z",
            "url": "https://files.pythonhosted.org/packages/d5/e1/3e9013159b4cbb71df9bd7611cbf90dc2c621c8aeeb677fc41dad72f2261/webcolors-1.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a1fbf95560c6a5d4469d9c49e24cf1b5d4d21ffab5608251c6020a965fb7791c",
                "md5": "c9be30c5b0cf1cad32e4cbacbb2229e9",
                "sha256": "c225b674c83fa923be93d235330ce0300373d02885cef23238813b0d5668304a"
            },
            "downloads": -1,
            "filename": "webcolors-1.13.tar.gz",
            "has_sig": true,
            "md5_digest": "c9be30c5b0cf1cad32e4cbacbb2229e9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 41152,
            "upload_time": "2023-03-27T05:52:57",
            "upload_time_iso_8601": "2023-03-27T05:52:57.527408Z",
            "url": "https://files.pythonhosted.org/packages/a1/fb/f95560c6a5d4469d9c49e24cf1b5d4d21ffab5608251c6020a965fb7791c/webcolors-1.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-27 05:52:57",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "webcolors"
}
        
Elapsed time: 0.06294s