ketamine


Nameketamine JSON
Version 1.0.1 PyPI version JSON
download
home_page
SummaryA robust python library for colour conversion between colour models.
upload_time2023-08-26 05:40:46
maintainer
docs_urlNone
authorsertdfyguhi
requires_python>=2.7
license
keywords color color conversion colour colour conversion conversion graphics rgb
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ketamine: A robust python library for colour conversion.

A python library for colour conversion between colour models.

# Supported Colour Models

- RGB, RGBA, hex
- HSL
- HSV
- CMYK
- CIELAB
- CIEXYZ

# Installation

```sh
pip install ketamine
```

or install it from source:

```sh
git clone https://github.com/sertdfyguhi/ketamine/
cd ketamine
python3 -m build
pip install dist/*.whl
```

# Example Usage

```py
from ketamine import Colour

white = Colour.from_rgb(255, 255, 255)
print(white.to_hex()) # #ffffff
print(white.to_hsl()) # (0, 0.0, 1.0)

hsv = Colour.from_hsv(184, 0.85, 1.0)
print(hsv.to_rgb()) # (38.25000000000001, 240.54999999999995, 255.0)

# round RGB values first
hsv.round()

print(hsv.to_rgb()) # (38, 241, 255)
```

# Todo

- [x] Finish CIELAB colour conversion
  - [x] Correctly implement to_lab
- [x] Finish CMYK colour conversion
- [x] Publish to PyPI

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "ketamine",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=2.7",
    "maintainer_email": "",
    "keywords": "color,color conversion,colour,colour conversion,conversion,graphics,rgb",
    "author": "sertdfyguhi",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/c5/5e/d7da39a58a233e1ca9a6755e8c0193f25902e0c7f6814ace83cfa515a33f/ketamine-1.0.1.tar.gz",
    "platform": null,
    "description": "# ketamine: A robust python library for colour conversion.\n\nA python library for colour conversion between colour models.\n\n# Supported Colour Models\n\n- RGB, RGBA, hex\n- HSL\n- HSV\n- CMYK\n- CIELAB\n- CIEXYZ\n\n# Installation\n\n```sh\npip install ketamine\n```\n\nor install it from source:\n\n```sh\ngit clone https://github.com/sertdfyguhi/ketamine/\ncd ketamine\npython3 -m build\npip install dist/*.whl\n```\n\n# Example Usage\n\n```py\nfrom ketamine import Colour\n\nwhite = Colour.from_rgb(255, 255, 255)\nprint(white.to_hex()) # #ffffff\nprint(white.to_hsl()) # (0, 0.0, 1.0)\n\nhsv = Colour.from_hsv(184, 0.85, 1.0)\nprint(hsv.to_rgb()) # (38.25000000000001, 240.54999999999995, 255.0)\n\n# round RGB values first\nhsv.round()\n\nprint(hsv.to_rgb()) # (38, 241, 255)\n```\n\n# Todo\n\n- [x] Finish CIELAB colour conversion\n  - [x] Correctly implement to_lab\n- [x] Finish CMYK colour conversion\n- [x] Publish to PyPI\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A robust python library for colour conversion between colour models.",
    "version": "1.0.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/sertdfyguhi/ketamine/issues",
        "Homepage": "https://github.com/sertdfyguhi/ketamine"
    },
    "split_keywords": [
        "color",
        "color conversion",
        "colour",
        "colour conversion",
        "conversion",
        "graphics",
        "rgb"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7256aa36fa3226b16b255625492c819546c8f470c08eff2591e3bec6775de2e5",
                "md5": "0b3aeffe2c89dff454bd03e6a7cbbc18",
                "sha256": "c9a377f196328a200d80879a57b941febba9fc652d01437e7e176874cd73c338"
            },
            "downloads": -1,
            "filename": "ketamine-1.0.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0b3aeffe2c89dff454bd03e6a7cbbc18",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=2.7",
            "size": 14339,
            "upload_time": "2023-08-26T05:40:44",
            "upload_time_iso_8601": "2023-08-26T05:40:44.824427Z",
            "url": "https://files.pythonhosted.org/packages/72/56/aa36fa3226b16b255625492c819546c8f470c08eff2591e3bec6775de2e5/ketamine-1.0.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c55ed7da39a58a233e1ca9a6755e8c0193f25902e0c7f6814ace83cfa515a33f",
                "md5": "c176fc516eb34bacf33d14e1c58496b1",
                "sha256": "b63aa5367474c18de48c2687e30159791e0ddb95b85ba81cd0c96bc61efcc4dd"
            },
            "downloads": -1,
            "filename": "ketamine-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c176fc516eb34bacf33d14e1c58496b1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.7",
            "size": 11400,
            "upload_time": "2023-08-26T05:40:46",
            "upload_time_iso_8601": "2023-08-26T05:40:46.432496Z",
            "url": "https://files.pythonhosted.org/packages/c5/5e/d7da39a58a233e1ca9a6755e8c0193f25902e0c7f6814ace83cfa515a33f/ketamine-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-26 05:40:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sertdfyguhi",
    "github_project": "ketamine",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ketamine"
}
        
Elapsed time: 0.29732s