{"id":21155281,"url":"https://github.com/nlfmt/pyqt-colorpicker","last_synced_at":"2025-04-05T22:04:11.528Z","repository":{"id":39918145,"uuid":"299712329","full_name":"nlfmt/pyqt-colorpicker","owner":"nlfmt","description":"Modern visual Color Picker Dialog for Python (based on Qt's QDialog) to easily get color input from the user.","archived":false,"fork":false,"pushed_at":"2024-10-30T14:52:32.000Z","size":63,"stargazers_count":41,"open_issues_count":4,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T12:07:56.998Z","etag":null,"topics":["color","color-picker","hex","modern","popup","pyqt","pyside","python","qt","rgb","visual"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/vcolorpicker/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nlfmt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2020-09-29T19:03:38.000Z","updated_at":"2025-01-14T14:06:28.000Z","dependencies_parsed_at":"2022-09-26T20:52:46.086Z","dependency_job_id":"70e1c87c-6860-4d0f-be60-3487d5af5e88","html_url":"https://github.com/nlfmt/pyqt-colorpicker","commit_stats":{"total_commits":39,"total_committers":3,"mean_commits":13.0,"dds":"0.28205128205128205","last_synced_commit":"d8985ab8b0d03d0777d9572f5093465f187fa4ec"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlfmt%2Fpyqt-colorpicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlfmt%2Fpyqt-colorpicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlfmt%2Fpyqt-colorpicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlfmt%2Fpyqt-colorpicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nlfmt","download_url":"https://codeload.github.com/nlfmt/pyqt-colorpicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406085,"owners_count":20933803,"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","color-picker","hex","modern","popup","pyqt","pyside","python","qt","rgb","visual"],"created_at":"2024-11-20T11:17:21.776Z","updated_at":"2025-04-05T22:04:11.497Z","avatar_url":"https://github.com/nlfmt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vcolorpicker\nSimple visual Color Picker with a modern UI created with Qt to easily get color input from the user.\n\n![colorpicker](https://user-images.githubusercontent.com/71983360/95017068-408f8100-0657-11eb-8001-a6788e94abba.png)\n\n\n## Installation\n\n1. Install using pip:\n\n   ```\n   pip install vcolorpicker\n   ```\n\n   or clone the repository yourself and run:\n\n   ```\n   pip install .\n   ```\n\n## Usage\n\n2. To ask for a color, import the `getColor` function and run it:\n\n   ```python\n   from vcolorpicker import getColor\n   \n   color = getColor()\n   ```\n\n## Customization\n\n* **Showing custom last color:**\n\n   ```python\n   old_color = (255,255,255)\n   picked_color = getColor(old_color)\n   ```\n\n* **Changing the UI Theme**\n\n  ```python\n  from vcolorpicker import useLightTheme\n  \n  useLightTheme(True)\n  ```\n\n* **Adding Alpha selection**\n\n  ```python\n  from vcolorpicker import useAlpha\n  \n  useAlpha(True)\n  ```\n\n  When the ColorPicker uses Alpha, you have to pass a RGBA tuple\\\n  as the last color, otherwise there wil be an error.\n\n  ```python\n  old_color = (255,255,255,100)\n  picked_color = getColor(old_color)  # =\u003e (r,g,b,a)\n  ```\n\n## Color Formats and Conversion\n\n* The default format `getColor` will give you is RGB(A),\\\n  but you can use vcolorpickers color conversion functions\\\n  if you have a different format like HSV or HEX.\n\n   `hsv2rgb` **HSV(A)** to **RGB(A)**\\\n   `rgb2hsv` **RGB(A)** to **HSV(A)**\\\n   `rgb2hex` **RGB(A)** to **HEX**\\\n   `hex2rgb` **HEX** to **RGB**\\\n   `hex2hsv` **HEX** to **HSV**\\\n   `hsv2hex` **HSV(A)** to **HEX**\n\n* Example:\n  ```python\n  from vcolorpicker import getColor, hsv2rgb, rgb2hsv \n  \n  old_color = hsv2rgb((50,50,100,100))  # =\u003e (127,255,255,100)\n\n  picked_color = rgb2hsv(getColor(old_color))\n  ```\n\n* **Color Formats:**\n\n  **RGB** values range from **0** to **255**\\\n  **HSV** values range from **0** to **100**\\\n  **HEX** values should be in format: `\"XXXXXX\"` or `\"xxxxxx\"`\\\n  **Alpha** values range from **0** to **100**\n\n\n## Compatibility\n  This package is compatible with **Python 3.7+** and above.\n  It uses [qtpy](https://github.com/spyder-ide/qtpy) under the hood, so it should work with all Qt bindings (PyQt5, PySide2, PySide6, PyQt6).\n\n## Previous versions\n  In previous versions you had to create a ColorPicker object first and then\\\n  call it's `getColor` method. This is still supported, you just have to\\\n  import the `ColorPicker` class.\n\n  The color conversion functions are not methods anymore, you can import them\\\n  directly with `from vcolorpicker import hsv2rgb, rgb2hsv`.\n\n  You also had to create a `QApplication` object before being able to run the\\\n  ColorPicker, now it automatically creates one by itself if there isn't one yet.\\\n  If you need to get the auto-created application, you can use this:\n\n  ```python\n  from PyQt5.QtWidgets import QApplication\n  app = QApplication.instance()\n  ```\n\n## Bugs and Improvement ideas\n  If you find a bug, you can open an issue or write me an email (nlfmt@gmx.de)\\\n  and I will try to get to it as fast as possible, or you can implement it\\\n  yourself and create a pull request.\n\n\n## License\n  This software is licensed under the **MIT License**.\\\n  More information is provided in the dedicated LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlfmt%2Fpyqt-colorpicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnlfmt%2Fpyqt-colorpicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlfmt%2Fpyqt-colorpicker/lists"}