x256offline


Namex256offline JSON
Version 0.0.4 PyPI version JSON
download
home_pageNone
Summaryquickly find the nearest xterm 256 color index of an RGB
upload_time2024-04-19 19:14:31
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2024 Elaina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords x256 xterm color
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            x256offline
===========

Quickly find the nearest xterm 256 color index of an RGB.

Installation
------------

.. code-block:: shell

    python -m pip install x256offline

Simple Example
--------------

.. code-block:: python

    import x256offline as x256

    c0 = 0x23307b
    x0e = x256.from_rgb(c0)
    x0w = x256.from_rgb(c0, weighted=True)

    print(hex(c0))
    print(x0e, hex(x256.to_rgb(x0e)))
    print(x0w, hex(x256.to_rgb(x0w)))

    # 0x23307b
    # 4 0x80
    # 24 0x5f87

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "x256offline",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "userElaina <userelaina@pm.me>",
    "keywords": "x256, xterm, color",
    "author": null,
    "author_email": "userElaina <userelaina@pm.me>",
    "download_url": "https://files.pythonhosted.org/packages/49/7e/3e5e438f02bb4d6c221abafc771a5debc8df42280ad7153980fbb9420f90/x256offline-0.0.4.tar.gz",
    "platform": null,
    "description": "x256offline\n===========\n\nQuickly find the nearest xterm 256 color index of an RGB.\n\nInstallation\n------------\n\n.. code-block:: shell\n\n    python -m pip install x256offline\n\nSimple Example\n--------------\n\n.. code-block:: python\n\n    import x256offline as x256\n\n    c0 = 0x23307b\n    x0e = x256.from_rgb(c0)\n    x0w = x256.from_rgb(c0, weighted=True)\n\n    print(hex(c0))\n    print(x0e, hex(x256.to_rgb(x0e)))\n    print(x0w, hex(x256.to_rgb(x0w)))\n\n    # 0x23307b\n    # 4 0x80\n    # 24 0x5f87\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Elaina  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "quickly find the nearest xterm 256 color index of an RGB",
    "version": "0.0.4",
    "project_urls": {
        "Bug Reports": "https://github.com/userElaina/python-x256-offline/issues",
        "Homepage": "https://github.com/userElaina/python-x256-offline",
        "Source": "https://github.com/userElaina/python-x256-offline"
    },
    "split_keywords": [
        "x256",
        " xterm",
        " color"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e16384b0af8337a68ee2a0ecce0d28686d696f91369c3beba006c5a921e1b3c0",
                "md5": "9794e6ee61cdbbbf14ced54dffd38111",
                "sha256": "267481808aa884e771a7f4530d00063ae38ff018d11d9b50aaef3476f8a5c570"
            },
            "downloads": -1,
            "filename": "x256offline-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9794e6ee61cdbbbf14ced54dffd38111",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 284782,
            "upload_time": "2024-04-19T19:14:29",
            "upload_time_iso_8601": "2024-04-19T19:14:29.171872Z",
            "url": "https://files.pythonhosted.org/packages/e1/63/84b0af8337a68ee2a0ecce0d28686d696f91369c3beba006c5a921e1b3c0/x256offline-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "497e3e5e438f02bb4d6c221abafc771a5debc8df42280ad7153980fbb9420f90",
                "md5": "4b3a535ed255085ab95b54ac18ec1eac",
                "sha256": "2d76470b20bf4773677bd9c44120d8979df577ea744bf0ba7eeb74308ac4c7e0"
            },
            "downloads": -1,
            "filename": "x256offline-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "4b3a535ed255085ab95b54ac18ec1eac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 284719,
            "upload_time": "2024-04-19T19:14:31",
            "upload_time_iso_8601": "2024-04-19T19:14:31.706118Z",
            "url": "https://files.pythonhosted.org/packages/49/7e/3e5e438f02bb4d6c221abafc771a5debc8df42280ad7153980fbb9420f90/x256offline-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-19 19:14:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "userElaina",
    "github_project": "python-x256-offline",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "x256offline"
}
        
Elapsed time: 0.25794s