ColorKit


NameColorKit JSON
Version 0.0.5 PyPI version JSON
download
home_page
SummaryA comprehensive Python package for advanced color manipulation and analysis
upload_time2024-02-25 16:26:53
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 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")

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

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

# Create an info message in the terminal
Info("This is an info message")
```

## 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))
```

## 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)
```

# 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": "",
    "name": "ColorKit",
    "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/63/0b/afa5f8680e9e75b4a2225dfdf05d5ce4cb7e4f36ee2c64b7d01265f8f582/ColorKit-0.0.5.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\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\")\n\n# Create an error message in the terminal\nError(\"This is an error message\")\n\n# Create a success message in the terminal\nSuccess(\"This is a success message\")\n\n# Create an info message in the terminal\nInfo(\"This is an info message\")\n```\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\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\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.0.5",
    "project_urls": null,
    "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": "630bafa5f8680e9e75b4a2225dfdf05d5ce4cb7e4f36ee2c64b7d01265f8f582",
                "md5": "16649959664dfd6b05657a274d0ccf2e",
                "sha256": "441b03b8539eef10350f42d6ac2c62c8331daf66f95b34fa9b863a75dbe0f09e"
            },
            "downloads": -1,
            "filename": "ColorKit-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "16649959664dfd6b05657a274d0ccf2e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10321,
            "upload_time": "2024-02-25T16:26:53",
            "upload_time_iso_8601": "2024-02-25T16:26:53.227578Z",
            "url": "https://files.pythonhosted.org/packages/63/0b/afa5f8680e9e75b4a2225dfdf05d5ce4cb7e4f36ee2c64b7d01265f8f582/ColorKit-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-25 16:26:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "colorkit"
}
        
Elapsed time: 1.72798s