1.1.2 • Published 10 months ago
@opencarllo/gradify v1.1.2
Gradify ·

Gradify is a lightweight library for generating unique icons with vibrant gradients.
Table of Contents
Installation
To install Gradify, ensure you have Node.js installed. Then, use the following command to install the dependencies:
npm install @opencarllo/gradifyUsage
You can use Gradify to generate gradient icons directly from the command line. The following command will generate an icon with default dimensions (512x512) and save it in the current directory:
npx gradify generate iconYou can customize the icon's width, height, and target directory like this:
npx gradify generate icon --width 256 --height 256 --target ./iconsAPI
generateIcon
Generates a gradient icon with random colors.
Parameters
- options (object): The configuration options for generating the icon.
- width (number): The width of the icon (default: 512).
- height (number): The height of the icon (default: 512).
- targetDirectory (string | undefined): The directory where the icon will be saved. If not specified, the icon will be saved in the current directory.
Example
import Gradify from '@opencarllo/gradify';
Gradify.generateIcon({
width: 256,
height: 256,
targetDirectory: './icons',
}).catch(console.error);Development
To build the project, use the following command:
npm run buildTo run the project, execute:
node dist/core/index.js generate iconLicense
This project is licensed under the BSD 3-Clause Clear License. See the LICENSE.md file for details.