Skip to content

buckley-w-david/colour-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

$ 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 outfile

positional arguments:
  infile
  outfile

optional 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] infile

positional arguments:
  infile

optional arguments:
  -h, --help  show this help message and exit

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages