Small program to generate gradient images combinating a set of given hex colours
- Download and unzip repository.
- Open cmd inside the folder.
- Activate python environment
./venv/Scripts/Activate
- With the environment activated, execute the program as explained in Usage:
python cgg.py...
TO-DO
- Option to introduce color list as text file.
- Generates a gradient image from two colors
- Generates gradient images from multiple colors by:
- Making every combination possible of 2 colors.
- Making pairs as long as the color amount is even.
Execute cgg.py through the command prompt:
python cgg.py [-h] [-d DIRECTORY] [-W WIDTH] [-H HEIGHT] [-m [{combinatory,pairs}]] [-v VERBOSE] colors [colors ...]
-
directorymust be enclosed in quotes. -
widthin pixels (default is 100). -
heightin pixels (default is 200). -
modeChoose between combinatory or pairs mode.-
-c COMBINATORYGenerates a gradient for every combination of the colors introduced. -
-p PAIRSGenerates gradients by selecting the colors introduced in pairs of two.
-
-
verboseenables console output. -
colorslist of hexadecimal color values separated by whitespaces.
Example:
python cgg.py -v -W 10 -H 10 -m pairs ff0000 00ff00 0000ff ffffff
Contact me on Twitter