discord-image-utils
Version:
A powerful library for generating and modifying images with Discord.js - includes meme generation, filters, effects and animations
16 lines (15 loc) • 616 B
TypeScript
/** @format */
/**
* Class for generating a solid color image.
*/
export default class Color {
/**
* Creates a new image filled with the specified color.
*
* @param color - A valid CSS color (e.g. "#FFFFFF", "rgb(255,255,255)") to fill the image with. Defaults to white.
* @param width - The width of the image in pixels. Defaults to 480.
* @param height - The height of the image in pixels. Defaults to 480.
* @returns A Promise resolving with a Buffer containing the generated PNG image.
*/
getImage(color?: string, width?: number, height?: number): Promise<Buffer>;
}