webcolors


Namewebcolors JSON
Version 24.8.0 PyPI version JSON
download
home_pageNone
SummaryA library for working with the color formats defined by HTML and CSS.
upload_time2024-08-10 08:52:31
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
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 and converting between the
various HTML/CSS color formats.

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": null,
    "name": "webcolors",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "color, css, html, web",
    "author": null,
    "author_email": "James Bennett <james@b-list.org>",
    "download_url": "https://files.pythonhosted.org/packages/fe/f8/53150a5bda7e042840b14f0236e1c0a4819d403658e3d453237983addfac/webcolors-24.8.0.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 and converting between the\nvarious HTML/CSS color formats.\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": "24.8.0",
    "project_urls": {
        "documentation": "https://webcolors.readthedocs.io",
        "homepage": "https://github.com/ubernostrum/webcolors"
    },
    "split_keywords": [
        "color",
        " css",
        " html",
        " web"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f03312020ba99beaff91682b28dc0bbf0345bbc3244a4afbae7644e4fa348f23",
                "md5": "757533d6870098d36edfafcebf2fd009",
                "sha256": "fc4c3b59358ada164552084a8ebee637c221e4059267d0f8325b3b560f6c7f0a"
            },
            "downloads": -1,
            "filename": "webcolors-24.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "757533d6870098d36edfafcebf2fd009",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 15027,
            "upload_time": "2024-08-10T08:52:28",
            "upload_time_iso_8601": "2024-08-10T08:52:28.707935Z",
            "url": "https://files.pythonhosted.org/packages/f0/33/12020ba99beaff91682b28dc0bbf0345bbc3244a4afbae7644e4fa348f23/webcolors-24.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fef853150a5bda7e042840b14f0236e1c0a4819d403658e3d453237983addfac",
                "md5": "8670cab938c118fe6f628799002a722e",
                "sha256": "08b07af286a01bcd30d583a7acadf629583d1f79bfef27dd2c2c5c263817277d"
            },
            "downloads": -1,
            "filename": "webcolors-24.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8670cab938c118fe6f628799002a722e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 42392,
            "upload_time": "2024-08-10T08:52:31",
            "upload_time_iso_8601": "2024-08-10T08:52:31.226036Z",
            "url": "https://files.pythonhosted.org/packages/fe/f8/53150a5bda7e042840b14f0236e1c0a4819d403658e3d453237983addfac/webcolors-24.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-10 08:52:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ubernostrum",
    "github_project": "webcolors",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "webcolors"
}
        
Elapsed time: 0.37837s