Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new RgbColor(r: number, g: number, b: number, a?: number): RgbColor
  • Parameters

    • r: number
    • g: number
    • b: number
    • Optional a: number

    Returns RgbColor

Properties

Readonly a

a: number

Readonly b

b: number

Readonly g

g: number

Readonly r

r: number

Readonly stringValue

stringValue: undefined | string

Static Brighter

Brighter: number

Static Darker

Darker: number

Accessors

lightness

  • get lightness(): number
  • Returns number

Methods

alpha

  • alpha(): number
  • alpha(a: number): RgbColor
  • Returns number

  • Parameters

    • a: number

    Returns RgbColor

combine

  • Parameters

    • that: AnyColor
    • Optional scalar: number

    Returns Color

contrast

  • contrast(k?: number): Color
  • Parameters

    • Optional k: number

    Returns Color

darker

  • Parameters

    • Optional k: number

    Returns RgbColor

debug

  • debug(output: Output<unknown>): void
  • Parameters

    Returns void

equals

  • equals(that: unknown): boolean
  • Parameters

    • that: unknown

    Returns boolean

equivalentTo

  • equivalentTo(that: unknown, epsilon?: number): boolean
  • Parameters

    • that: unknown
    • Optional epsilon: number

    Returns boolean

hashCode

  • hashCode(): number
  • Returns number

hsl

  • Returns HslColor

interpolateTo

isDefined

  • isDefined(): boolean
  • Returns boolean

lighter

  • Parameters

    • Optional k: number

    Returns RgbColor

plus

  • Parameters

    Returns RgbColor

rgb

  • Returns RgbColor

times

  • Parameters

    • scalar: number

    Returns RgbColor

toHexString

  • toHexString(): string
  • Returns string

toString

  • toString(): string
  • Returns string

Static black

  • Parameters

    • Optional alpha: number

    Returns RgbColor

Static forName

  • forName(name: string): null | Color
  • Parameters

    • name: string

    Returns null | Color

Static form

  • Returns Form<Color, AnyColor>

Static fromAny

Static fromInit

Static fromValue

  • Parameters

    Returns null | RgbColor

Static hsl

  • Parameters

    • h: AnyAngle
    • s: number
    • l: number
    • Optional a: number

    Returns HslColor

Static isAny

  • Parameters

    • value: unknown

    Returns value is AnyRgbColor

Static isInit

  • Parameters

    • value: unknown

    Returns value is RgbColorInit

Static parse

  • Parameters

    • str: string

    Returns RgbColor

Static rgb

  • rgb(r: number, g: number, b: number, a?: number): RgbColor
  • Parameters

    • r: number
    • g: number
    • b: number
    • Optional a: number

    Returns RgbColor

Static transparent

  • Returns RgbColor

Static white

  • Parameters

    • Optional alpha: number

    Returns RgbColor

Generated using TypeDoc