Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

RGBColor

RGBColor: { b: number; g: number; r: number }

Type declaration

  • b: number
  • g: number
  • r: number

Functions

Const calculateColor

  • calculateColor(begin: number, end: number, pos: number): string

Const colorString

  • colorString(color: { a: any; b: any; g: any; r: any }): string
  • Parameters

    • color: { a: any; b: any; g: any; r: any }
      • a: any
      • b: any
      • g: any
      • r: any

    Returns string

Const colorize

  • colorize(color: string, params?: { b: number; g: number; r: number }): number
  • Returns color representation in RGB format

    Parameters

    • color: string
    • params: { b: number; g: number; r: number } = ...
      • b: number
      • g: number
      • r: number

    Returns number

Const convertHexStringToRgbString

  • convertHexStringToRgbString(hex: string): RGBColor

Const darken

  • darken(color: string, percent: number, rgb?: boolean): string
  • Parameters

    • color: string
    • percent: number
    • rgb: boolean = false

    Returns string

Const dropShadow

  • dropShadow(effect: { color: any; offset: { x: any; y: any }; radius: any }): string
  • Parameters

    • effect: { color: any; offset: { x: any; y: any }; radius: any }
      • color: any
      • offset: { x: any; y: any }
        • x: any
        • y: any
      • radius: any

    Returns string

Const effects

  • effects(baseColor: string): any

Const getColorBrightness

  • getColorBrightness(color: string | RGBColor): number

Const getColorByUsername

  • getColorByUsername(username: string, colors: string[]): string
  • Parameters

    • username: string
    • colors: string[]

    Returns string

Const getRandomColor

  • getRandomColor(): string

Const getRandomColor2

  • getRandomColor2(): string

Const get_random_color

  • get_random_color(): string

Const hue2rgb

  • hue2rgb(p: any, q: any, t: any): number

Const imageURL

  • imageURL(hash: string): string

Const innerShadow

  • innerShadow(effect: any): string

Const isColorBright

  • isColorBright(color: string | RGBColor, threshold?: number): boolean

Const lighten

  • lighten(color: any, percent: any, rgb: any): string
  • Parameters

    • color: any
    • percent: any
    • rgb: any

    Returns string

Const rainbow

  • rainbow(numOfSteps: number, step: number): string
  • Parameters

    • numOfSteps: number
    • step: number

    Returns string

Const rainbowStop

  • rainbowStop(h: number): string

Const randColor

  • randColor(colors: any): any

Const randomHsl

  • randomHsl(): string

Const Private rgbToHsl

  • rgbToHsl(r: number, g: number, b: number): number[]

Const shadeColor

  • shadeColor(color: string, percent: number, rgb?: boolean): string
  • Parameters

    • color: string
    • percent: number
    • rgb: boolean = false

    Returns string

Const sourceFromHex

  • sourceFromHex(color: string): number[]
  • Returns array representation (ex: [100, 100, 200, 1]) of a color that's in HEX format

    static

    Parameters

    • color: string

      ex: FF5555 or FF5544CC (RGBa)

    Returns number[]

    source