Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cqllum/colour-swatch
Get the hex colour of any image simply by providing the URL of the image.
https://github.com/cqllum/colour-swatch
Last synced: about 2 months ago
JSON representation
Get the hex colour of any image simply by providing the URL of the image.
- Host: GitHub
- URL: https://github.com/cqllum/colour-swatch
- Owner: cqllum
- Created: 2022-04-14T20:56:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-16T09:15:42.000Z (over 2 years ago)
- Last Synced: 2024-05-31T00:19:36.652Z (7 months ago)
- Language: Jupyter Notebook
- Size: 116 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Colour-Swatch | Image to Hex Code
Get the hex colour of any image simply by providing the URL of the image.# Initial Prerequisites
`Python` - Downloadable here: https://www.python.org/downloads/# Python Requirements
`requests` package - installable via python `pip install requests``PIL` package - installable via python `pip install Pillow`
# Usage guide
Provide the number of `snapshots` - the more the better
Supply the `URL` of the `image` you would like to get the hex colour for.# Function to retrieve data
```
# The image URL
image = "https://www.clker.com/cliparts/C/H/o/A/i/k/pink-shirt-hi.png"# The number of snapshots to take of the image
snapshots = 25# Function to gather data
get_image(image, snapshots)
```