Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/harmony/src/utils/colorutil.ts>ColorUtil

An easy to use Discord API Library for Deno.
Go to Latest
class ColorUtil
import { ColorUtil } from "https://deno.land/x/harmony@v2.8.0/src/utils/colorutil.ts";

Constructors

new
ColorUtil()

Static Properties

readonly
colorList: Colors

Color list

Static Methods

intToHex(color: number): string

Encodes color int into hex code

isHex(hexcode: string): boolean

Validates hex code

randomHex(): string

Returns random hex code

resolveColor(color?: keyof Colors | "RANDOM"): number

Resolves color by name

resolveHex(hexcode: string): number

Resolves hex code

resolveRGB(color: [number, number, number]): number

Resolves RGB color array

validateColor(color: number): boolean

Validates hex color