ColorKitv2


NameColorKitv2 JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/bzm10/ColorKit
SummaryA comprehensive Python package for advanced color manipulation and analysis
upload_time2024-03-08 13:59:54
maintainer
docs_urlNone
authorBenjamin Mark
requires_python
licenseMIT
keywords color conversion rgb hex cmyk hsl lab luv xyz yiq hsv yuv ycbcr lch lms color toolkit color space python color color manipulation color analysis color utility python color
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ColorKit

ColorKit is a comprehensive Python library designed for versatile color conversions, manipulations, and more. It simplifies working with various color spaces such as RGB, HEX, CMYK, HSL, LAB, LUV, XYZ, YIQ, HSV, YUV, YCbCr, LCH, and LMS. Whether you're developing applications in web development, data analysis, or scientific computing, ColorKit offers a robust set of tools to enhance your project's color processing capabilities.

With ColorKit, you can easily convert colors between different color spaces, generate random colors, manipulate color palettes, and perform color-related operations. It provides functions to convert colors from one color space to another, generate random colors in different color spaces, print colored text to the terminal, select colors from a color palette, view colors in a window, and more.

ColorKit's extensive documentation provides detailed examples and usage instructions for each color space conversion and feature. It also includes a list of supported color spaces and their corresponding conversion functions. Installation is straightforward using pip, making it easy to integrate ColorKit into your Python projects.

Start leveraging the power of ColorKit to enhance your color processing capabilities in Python today!


## Features

- **Color Space Conversions**: Easily convert between popular and specialized color spaces.
- **Random Color Generator**: Generate random colors in various color spaces.
- **Colored Terminal Outputs/Logs**: Print colored text to the terminal.
- **Color Palette**: Select colors from a color palette.
- **Color Viewer**: View any color in a window.
- **Color Names Converter**: Get the color value from a color name.

## Installation

```bash
pip3 install ColorKit
```

# Documentation

## Color Space Conversions Example

```python
import ColorKit as ck

# Convert RGB to HEX
# NOTE: The RGB values must be in a tuple.
hex_color = ck.rgb_to_hex((255, 0, 0))
# NOTE: The HEX value will be a string.
rgb_color = ck.hex_to_rgb("#FF0000")

# Convert RGB to CMYK
cmyk_color = ck.rgb_to_cmyk((255, 0, 0))
rgb_color = ck.cmyk_to_rgb((0, 1, 1, 0))

# You can also specify the decimal places for the returned values. as the second argument.
# NOTE: You can only specify the decimal places for colors converting from RGB to another color space.
hsl_color = ck.rgb_to_xyz((255, 0, 0), 2)
# Output: (41.24, 21.26, 1.93)

```

## You can use the same approach for the following color spaces:

<details>
    <summary>List of color spaces</summary>
    rgb_to_hex,
    hex_to_rgb,
    rgb_to_hsl,
    hsl_to_rgb,
    rgb_to_cmyk,
    cmyk_to_rgb,
    rgb_to_yuv,
    yuv_to_rgb,
    rgb_to_yiq,
    yiq_to_rgb,
    rgb_to_ycbcr,
    ycbcr_to_rgb,
    rgb_to_xyz,
    xyz_to_rgb,
    rgb_to_lab,
    lab_to_rgb,
    rgb_to_luv,
    luv_to_rgb,
    rgb_to_lch,
    lch_to_rgb,
    rgb_to_lms,
    lms_to_rgb,
    rgb_to_hsv,
    hsv_to_rgb,
    rgb_to_hsv,
    hsv_to_rgb,
    rgb_to_xyz
</details>

NOTE: All the color spaces are in the form of tuples (Except HEX).

## Random Color Generator Example

```python
import ColorKit as ck

color = ck.RandomColor()
hex = color.hex()
rgb = color.rgb()

# You can also view the color in a window.
color.view()
```

## Colored Terminal Outputs/Logs Example

To print a log message you can use the folowing code:

```python
from ColorKit import Warning, Error, Success,Info

# Create a warning message in the terminal
Warning("This is a warning message",True,True)

# Create an error message in the terminal
Error("This is an error message",True,True)

# Create a success message in the terminal
Success("This is a success message",True,True)

# Create an info message in the terminal
Info("This is an info message",True,True)
```
### The first argument is the message, the second argument is if the message is bold, and the third argument is if the full message is colored or only the WARNING/ERROR/SUCCESS/INFO part. Use True or False for the second and third arguments.

## Custom Colored Terminal Outputs Example
    
```python
from ColorKit import Print

# Print a message in the terminal with a custom color (HEX, RGB, or color name)
# Make sure you you use Print (with a capital P) instead of print.
Print("This is a custom message", "red")
Print("This is a custom message", "#FF0000")
Print("This is a custom message", (255, 0, 0))

# You can also add a style to the message
# (bold, underline, italic, strike, overline, inverse, crossed)
Print("This is a custom message", "red", "bold")

# You can also add a background color to the message
Print("This is a custom message", "red", "bold", "blue")
```

### The first argument is the message, the second argument is the color, the third argument is the style, and the fourth argument is the background color. 

## Color Palette Example

```python
import ColorKit as ck

# Open the color palette window and select a color.
picker = ck.ColorPicker()

# Pick the color format the color will be returned in. (RGB/HEX/HSL/CMYK)
color = picker.rgb()

# Then you can use the color as you wish.
# For example, you can print the color to the terminal.
print(color)
```

## Color Viewer Example

```python
from ColorKit import ViewColor

# Select a color to view in a window.
color = (255, 0, 0)

# Open the color viewer window.
ViewColor(color)
```

## Color Names To Color Value Example

```python
import ColorKit as ck

# Get the color value from a color name in a RGB format. (You can also use HEX)
color = ck.Color("red").rgb()
print(color)

# Output: (255, 0, 0)
```
### List of all [available colors](https://github.com/bzm10/ColorKit/blob/main/COLORLIST.md)

# License

ColorKit is released under the MIT License - see the [LICENSE](https://github.com/bzm10/ColorKit/blame/main/LICENSE) file for details.

# Contributing

If you would like to contribute to ColorKit, please read the [CONTRIBUTING.md](https://github.com/bzm10/ColorKit/blob/main/CONTRIBUTING.md)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/bzm10/ColorKit",
    "name": "ColorKitv2",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "color conversion,RGB,HEX,CMYK,HSL,LAB,LUV,XYZ,YIQ,HSV,YUV,YCbCr,LCH,LMS,color toolkit,color space,Python color,color manipulation,color analysis,color utility,python,color",
    "author": "Benjamin Mark",
    "author_email": "bzmarkovits@yahoo.com",
    "download_url": "https://files.pythonhosted.org/packages/0e/34/d1925e6a8147fc52a5dcf1ee2ee3f18898fb7ec362efaa1c18e3f8a45410/ColorKitv2-0.1.0.tar.gz",
    "platform": null,
    "description": "# ColorKit\n\nColorKit is a comprehensive Python library designed for versatile color conversions, manipulations, and more. It simplifies working with various color spaces such as RGB, HEX, CMYK, HSL, LAB, LUV, XYZ, YIQ, HSV, YUV, YCbCr, LCH, and LMS. Whether you're developing applications in web development, data analysis, or scientific computing, ColorKit offers a robust set of tools to enhance your project's color processing capabilities.\n\nWith ColorKit, you can easily convert colors between different color spaces, generate random colors, manipulate color palettes, and perform color-related operations. It provides functions to convert colors from one color space to another, generate random colors in different color spaces, print colored text to the terminal, select colors from a color palette, view colors in a window, and more.\n\nColorKit's extensive documentation provides detailed examples and usage instructions for each color space conversion and feature. It also includes a list of supported color spaces and their corresponding conversion functions. Installation is straightforward using pip, making it easy to integrate ColorKit into your Python projects.\n\nStart leveraging the power of ColorKit to enhance your color processing capabilities in Python today!\n\n\n## Features\n\n- **Color Space Conversions**: Easily convert between popular and specialized color spaces.\n- **Random Color Generator**: Generate random colors in various color spaces.\n- **Colored Terminal Outputs/Logs**: Print colored text to the terminal.\n- **Color Palette**: Select colors from a color palette.\n- **Color Viewer**: View any color in a window.\n- **Color Names Converter**: Get the color value from a color name.\n\n## Installation\n\n```bash\npip3 install ColorKit\n```\n\n# Documentation\n\n## Color Space Conversions Example\n\n```python\nimport ColorKit as ck\n\n# Convert RGB to HEX\n# NOTE: The RGB values must be in a tuple.\nhex_color = ck.rgb_to_hex((255, 0, 0))\n# NOTE: The HEX value will be a string.\nrgb_color = ck.hex_to_rgb(\"#FF0000\")\n\n# Convert RGB to CMYK\ncmyk_color = ck.rgb_to_cmyk((255, 0, 0))\nrgb_color = ck.cmyk_to_rgb((0, 1, 1, 0))\n\n# You can also specify the decimal places for the returned values. as the second argument.\n# NOTE: You can only specify the decimal places for colors converting from RGB to another color space.\nhsl_color = ck.rgb_to_xyz((255, 0, 0), 2)\n# Output: (41.24, 21.26, 1.93)\n\n```\n\n## You can use the same approach for the following color spaces:\n\n<details>\n    <summary>List of color spaces</summary>\n    rgb_to_hex,\n    hex_to_rgb,\n    rgb_to_hsl,\n    hsl_to_rgb,\n    rgb_to_cmyk,\n    cmyk_to_rgb,\n    rgb_to_yuv,\n    yuv_to_rgb,\n    rgb_to_yiq,\n    yiq_to_rgb,\n    rgb_to_ycbcr,\n    ycbcr_to_rgb,\n    rgb_to_xyz,\n    xyz_to_rgb,\n    rgb_to_lab,\n    lab_to_rgb,\n    rgb_to_luv,\n    luv_to_rgb,\n    rgb_to_lch,\n    lch_to_rgb,\n    rgb_to_lms,\n    lms_to_rgb,\n    rgb_to_hsv,\n    hsv_to_rgb,\n    rgb_to_hsv,\n    hsv_to_rgb,\n    rgb_to_xyz\n</details>\n\nNOTE: All the color spaces are in the form of tuples (Except HEX).\n\n## Random Color Generator Example\n\n```python\nimport ColorKit as ck\n\ncolor = ck.RandomColor()\nhex = color.hex()\nrgb = color.rgb()\n\n# You can also view the color in a window.\ncolor.view()\n```\n\n## Colored Terminal Outputs/Logs Example\n\nTo print a log message you can use the folowing code:\n\n```python\nfrom ColorKit import Warning, Error, Success,Info\n\n# Create a warning message in the terminal\nWarning(\"This is a warning message\",True,True)\n\n# Create an error message in the terminal\nError(\"This is an error message\",True,True)\n\n# Create a success message in the terminal\nSuccess(\"This is a success message\",True,True)\n\n# Create an info message in the terminal\nInfo(\"This is an info message\",True,True)\n```\n### The first argument is the message, the second argument is if the message is bold, and the third argument is if the full message is colored or only the WARNING/ERROR/SUCCESS/INFO part. Use True or False for the second and third arguments.\n\n## Custom Colored Terminal Outputs Example\n    \n```python\nfrom ColorKit import Print\n\n# Print a message in the terminal with a custom color (HEX, RGB, or color name)\n# Make sure you you use Print (with a capital P) instead of print.\nPrint(\"This is a custom message\", \"red\")\nPrint(\"This is a custom message\", \"#FF0000\")\nPrint(\"This is a custom message\", (255, 0, 0))\n\n# You can also add a style to the message\n# (bold, underline, italic, strike, overline, inverse, crossed)\nPrint(\"This is a custom message\", \"red\", \"bold\")\n\n# You can also add a background color to the message\nPrint(\"This is a custom message\", \"red\", \"bold\", \"blue\")\n```\n\n### The first argument is the message, the second argument is the color, the third argument is the style, and the fourth argument is the background color. \n\n## Color Palette Example\n\n```python\nimport ColorKit as ck\n\n# Open the color palette window and select a color.\npicker = ck.ColorPicker()\n\n# Pick the color format the color will be returned in. (RGB/HEX/HSL/CMYK)\ncolor = picker.rgb()\n\n# Then you can use the color as you wish.\n# For example, you can print the color to the terminal.\nprint(color)\n```\n\n## Color Viewer Example\n\n```python\nfrom ColorKit import ViewColor\n\n# Select a color to view in a window.\ncolor = (255, 0, 0)\n\n# Open the color viewer window.\nViewColor(color)\n```\n\n## Color Names To Color Value Example\n\n```python\nimport ColorKit as ck\n\n# Get the color value from a color name in a RGB format. (You can also use HEX)\ncolor = ck.Color(\"red\").rgb()\nprint(color)\n\n# Output: (255, 0, 0)\n```\n### List of all [available colors](https://github.com/bzm10/ColorKit/blob/main/COLORLIST.md)\n\n# License\n\nColorKit is released under the MIT License - see the [LICENSE](https://github.com/bzm10/ColorKit/blame/main/LICENSE) file for details.\n\n# Contributing\n\nIf you would like to contribute to ColorKit, please read the [CONTRIBUTING.md](https://github.com/bzm10/ColorKit/blob/main/CONTRIBUTING.md)\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A comprehensive Python package for advanced color manipulation and analysis",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/bzm10/ColorKit"
    },
    "split_keywords": [
        "color conversion",
        "rgb",
        "hex",
        "cmyk",
        "hsl",
        "lab",
        "luv",
        "xyz",
        "yiq",
        "hsv",
        "yuv",
        "ycbcr",
        "lch",
        "lms",
        "color toolkit",
        "color space",
        "python color",
        "color manipulation",
        "color analysis",
        "color utility",
        "python",
        "color"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5e2855bff5c3cac3522a2eaf0b812516be3deab9bd67e30dcba8070646e74b2",
                "md5": "189e38a4644ea93f5c25dcc05a31188a",
                "sha256": "39a6beb1c616e5a5d30af2c32476e07f80f5f104311895406656aa1591d9a31d"
            },
            "downloads": -1,
            "filename": "ColorKitv2-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "189e38a4644ea93f5c25dcc05a31188a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 10954,
            "upload_time": "2024-03-08T13:59:52",
            "upload_time_iso_8601": "2024-03-08T13:59:52.667147Z",
            "url": "https://files.pythonhosted.org/packages/a5/e2/855bff5c3cac3522a2eaf0b812516be3deab9bd67e30dcba8070646e74b2/ColorKitv2-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0e34d1925e6a8147fc52a5dcf1ee2ee3f18898fb7ec362efaa1c18e3f8a45410",
                "md5": "7428306d89364840ddee484251751d0b",
                "sha256": "057fe22cf4017b412988f2022a33fd1b72e03dd6e3b9d520faa1e5d953fe66c3"
            },
            "downloads": -1,
            "filename": "ColorKitv2-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7428306d89364840ddee484251751d0b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11106,
            "upload_time": "2024-03-08T13:59:54",
            "upload_time_iso_8601": "2024-03-08T13:59:54.303896Z",
            "url": "https://files.pythonhosted.org/packages/0e/34/d1925e6a8147fc52a5dcf1ee2ee3f18898fb7ec362efaa1c18e3f8a45410/ColorKitv2-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-08 13:59:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bzm10",
    "github_project": "ColorKit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "colorkitv2"
}
        
Elapsed time: 0.20465s