3.2.4 • Published 3 years ago
ping-colorizer v3.2.4
Make your ping into a colorful stirng!
Usage
import Color from 'ping-colorizer';
let Colors = {
low: "#00bb00", // Default
mid: "#ffff00", // Default
high: "#00ff00" // Default
};
const Colorizer = new Color({ colors: Colors });
Colorizer.setPing(this.ping);
console.log('Ping: ' + Colorizer.ping, Colorizer.getColor<string>('rgb'));
Methods
**.setPing(value: number)** - Sets the default ping.
**.getColor(type: "hex" | "rgb")** - Obtain the color string.
**.setColor(type: "high" | "mid" | "low", value: string)** - Replace the color.