https://github.com/buckley-w-david/colour-sort
https://github.com/buckley-w-david/colour-sort
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/buckley-w-david/colour-sort
- Owner: buckley-w-david
- Created: 2018-04-11T01:13:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-19T05:32:31.000Z (almost 3 years ago)
- Last Synced: 2025-03-12T13:47:03.509Z (7 months ago)
- Language: Python
- Size: 34.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Colour Sort
Generating Images using all 2563 RGB colours, inspired by https://allrgb.com/
### Technique
To generate a re-coloured image, the source image's pixel data is sorted (using one of several different sorting modes) using numpy's `argsort` function, giving us a mapping from the original to the sorted version. This mapping is then used to "unsort" an array of all 2563 colours that in sorted order. The result of this operation is then written out as our result.
### Installing
Go get [poetry](https://poetry.eustace.io/).
```
$ poetry install
```### Running
Once the tool has been installed, it can be ran with the following command
```
$ colour generate --help
usage: colour generate [-h] [--sort {brightness,avg,rgb,rbg,brg,bgr,grb,gbr}]
infile outfilepositional arguments:
infile
outfileoptional arguments:
-h, --help show this help message and exit
--sort {brightness,avg,rgb,rbg,brg,bgr,grb,gbr}$ colour verify --help
usage: colour verify [-h] infilepositional arguments:
infileoptional arguments:
-h, --help show this help message and exit
```