{"id":15442522,"url":"https://github.com/infinitode/hued","last_synced_at":"2025-04-19T19:56:09.103Z","repository":{"id":257798564,"uuid":"860914517","full_name":"Infinitode/Hued","owner":"Infinitode","description":"An open-source Python library for color processing, random color generation, conversion between common types, and retrieval of common color properties, color palettes, and color information.","archived":false,"fork":false,"pushed_at":"2025-04-09T08:02:42.000Z","size":65,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T08:08:34.715Z","etag":null,"topics":["color-generation","color-theory","colors","colorscheme","conversion","hsl","hsv","hue","python","rgb","utility"],"latest_commit_sha":null,"homepage":"https://infinitode.netlify.app","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Infinitode.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-21T14:02:36.000Z","updated_at":"2025-04-09T08:02:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"de8e6fa0-53ee-4810-a2ab-60eb87624109","html_url":"https://github.com/Infinitode/Hued","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.25,"last_synced_commit":"75b7634ac9db33edc534dda1207a38512537bea4"},"previous_names":["infinitode/hued"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Infinitode%2FHued","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Infinitode%2FHued/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Infinitode%2FHued/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Infinitode%2FHued/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Infinitode","download_url":"https://codeload.github.com/Infinitode/Hued/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249787075,"owners_count":21325569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["color-generation","color-theory","colors","colorscheme","conversion","hsl","hsv","hue","python","rgb","utility"],"created_at":"2024-10-01T19:28:17.579Z","updated_at":"2025-04-19T19:56:09.090Z","avatar_url":"https://github.com/Infinitode.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hued\n![Python Version](https://img.shields.io/badge/python-3.12-blue.svg)\n![Code Size](https://img.shields.io/github/languages/code-size/infinitode/hued)\n![Downloads](https://pepy.tech/badge/hued)\n![License Compliance](https://img.shields.io/badge/license-compliance-brightgreen.svg)\n![PyPI Version](https://img.shields.io/pypi/v/hued)\n\nAn open-source Python library for color generation, conversion, and retrieval of common properties, palettes, and color information.\n\n### Changes in version 1.0.6:\n- New functions under `ColorPalette` to create gradients and to export `ColorPalette` data as a CSV, TXT or JSON file.\n\n### Changes in version 1.0.5:\n- New conversion methods for `XYZ` / `CIE 1931 XYZ`.\n\n### Changes in version 1.0.4:\n- Updated `colors.py` with 500+ new color names to map to.\n\n### Changes in version 1.0.3:\n- Created new functions for the `analiysis` module. Including `rgb_to_linear`, and other functions to return more color properties, like luminance and vibrancy. We've also added new functions to calculate the color contrast ratio between to colors, and an accessibility function to return if foreground text color should be `light`, or `dark`, based on the background color.\n- Created a new `blend_colors` function in our `conversions` module, to blend 2 RGB colors based on a given ratio. Also created new color conversion functions to convert each format into another target format, instead of just `RGB`.\n- Added 3 more color schemes to `palettes`. Created new functions under the `ColorPalette` class, for random color generation, and a batch HEX color generation function.\n\n\u003e [!TIP]\n\u003e Most functions rely on the **RGB** color format, but you can quickly convert between RGB, and other color formats, using the functions provided in the `conversions` module.\n\n## Installation\n\nYou can install Hued using pip:\n\n```bash\npip install hued\n```\n\n## Supported Python Versions\n\nHued supports the following Python versions:\n\n- Python 3.6\n- Python 3.7\n- Python 3.8\n- Python 3.9\n- Python 3.10\n- Python 3.11 or later\n\nPlease ensure that one of these Python versions is installed before using Hued. Hued may not work as expected on lower versions of Python than the supported.\n\n## Features\n\n- Color Generation: Generate random colors and palettes.\n- Color Conversion: Convert between different color formats (RGB, HEX, HSL, etc.).\n- Color Properties: Retrieve properties like brightness, temperature, and whether a color is muted, pastel, or vibrant.\n- Color Names: Get relevant color names, based on HEX values, and convert between color names and HEX values.\n\n## Usage\n\n### Color Properties\n\n```python\nfrom hued.colors import ColorManager\n\n# Initialize the color manager\ncolor_manager = ColorManager()\n\n# Generate a random color\ncolorBlue = color_manager.get_color_by_name(\"Blue\");\n\nprint(\"Blue Hex:\", colorBlue.get(\"Hex\"));\n```\n\n\u003e You can view more properties by going to Hued's [package documentation](https://infinitode-docs.gitbook.io/documentation/package-documentation/hued-package-documentation)\n\n### Color Conversion\n\n```python\nfrom hued.conversions import hex_to_rgb, rgb_to_hsl\n\n# Convert HEX to RGB\nrgb_color = hex_to_rgb(\"FF0000\"); # Red\nprint(f\"Hex to RGB: {rgb_color}\")\n\n# Convert RGB to HSL\nhsl_color = rgb_to_hsl(255, 0, 0) # Red\nprint(f\"RGB to HSL: {hsl_color}\")\n```\n\n### Color Analysis\n\n```python\nfrom hued.analysis import get_temperature, is_pastel\n\n# Check if a color is a pastel color\npastel_color = (255, 200, 200)  # Example pastel color\nis_pastel = is_pastel(pastel_color)\nprint(f\"Is Pastel: {is_pastel}\")\n\n# Check if a color is vibrant\nwarm_color = (255, 0, 0)  # Example warm color\ntemperature = get_temperature(warm_color)\nprint(f\"The current color is: {temperature}\") # Warm\n```\n\n### Color Generation and Palettes\n\n```python\nfrom hued.palettes import ColorPalette\n\nbase_color = (255, 60, 52)  # Red\n\n# Initialize the ColorPalette with a base color (RGB)\npalette = ColorPalette(base_color)\n\n# Get the complementary color\ncomplementary = palette.generate_complementary()\nprint(f\"Complementary color of {base_color}: {complementary}\")\n\n# Generate a random palette, with calculated color schemes, and base color\nrandom_palette = palette.generate_random_palette()\nprint(f\"Generated color palette's base color: {random_palette.get('Base Color')}\")\n```\n\n\u003e More functions are available for the `ColorPalette` class, including converting all contained colors to **Hex colors**.\n\n## Contributing\n\nContributions are welcome! If you encounter any issues, have suggestions, or want to contribute to Hued, please open an issue or submit a pull request on [GitHub](https://github.com/infinitode/hued).\n\n## License\n\nHued is released under the terms of the **MIT License (Modified)**. Please see the [LICENSE](https://github.com/infinitode/hued/blob/main/LICENSE) file for the full text.\n\n**Modified License Clause**\n\nThe modified license clause grants users the permission to make derivative works based on the Hued software. However, it requires any substantial changes to the software to be clearly distinguished from the original work and distributed under a different name.\n\nBy enforcing this distinction, it aims to prevent direct publishing of the source code without changes while allowing users to create derivative works that incorporate the code but are not exactly the same.\n\nPlease read the full license terms in the [LICENSE](https://github.com/infinitode/hued/blob/main/LICENSE) file for complete details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinitode%2Fhued","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfinitode%2Fhued","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinitode%2Fhued/lists"}