Skip to content

onoxbr/color-gradient-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌈 colors-gradient-generator

The colors-gradient-generator is a simple and flexible package that allows you to generate color gradients for use in web projects, mobile apps, and more!

🚀 Installation

To get started, you can install the package via npm. Make sure you have Node.js installed.

npm install colors-gradient-generator

💡 How to Use

const gradientGenerator = require('colors-gradient-generator');

// Generate a gradient from blue to green and save the image as 'gradient.png'
colorGradientGenerator.generateGradientImage(['#3498db', '#2ecc71'], 400, 200, 'horizontal');

🎨 Available Functions


generateGradient(colors, direction)

Generates an object representing a linear gradient.

  • colors: Array of colors for the gradient.
  • direction: Gradient direction (optional).

generateGradientImage(colors, width, height, direction)

Generates an image of a linear gradient and return the URL.

  • colors: Array of colors for the gradient.
  • width: Image width (optional).
  • height: Image height (optional).
  • direction: Gradient direction (optional).

Made with ❤️ by nooxbr

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published