Skip to content

Takes an image and generates a gradient like image based off of the colors that appear within it.

Notifications You must be signed in to change notification settings

danieltrost/image-gradient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image-gradient

Image gradient takes an image and generates a gradient like image based off of the colors that appear within it. Output directory is respective to the original image file.

Usage

npm i
node index.js images/test.jpeg

Configuration options

To change the configuration of the generated image, edit the values within index.js

Changing gradient image size

// put your values here [width, height]
const size = [Number, Number];

Changing number of columns

let columns = <Number>;

Toggling horizontal columns

Horizontal columns provide an interesting perspective, but can be disabled and the script will use solely vertical columns.

// false makes script only generate vertical columns
const useHorizontalColumns = <Boolean>;

Example

Original source:

Original

Generated with horizontal lines:

Generated, horizontal lines

Generated with vertical lines only:

Generated, vertical lines only

About

Takes an image and generates a gradient like image based off of the colors that appear within it.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published