Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 1.84 KB

README.md

File metadata and controls

65 lines (43 loc) · 1.84 KB

combinatory-gradient-generator

Small program to generate gradient images combinating a set of given hex colours

Setup

  • 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...

Features

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.

Usage

Execute cgg.py through the command prompt:

python cgg.py [-h] [-d DIRECTORY] [-W WIDTH] [-H HEIGHT] [-m [{combinatory,pairs}]] [-v VERBOSE] colors [colors ...]


  • directory must be enclosed in quotes.

  • width in pixels (default is 100).

  • height in pixels (default is 200).

  • mode Choose between combinatory or pairs mode.

    • -c COMBINATORY Generates a gradient for every combination of the colors introduced.

    • -p PAIRS Generates gradients by selecting the colors introduced in pairs of two.

  • verbose enables console output.

  • colors list 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