Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new HslColor(h: number, s: number, l: number, a?: number): HslColor
  • Parameters

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

    Returns HslColor

Properties

Readonly a

a: number

Readonly h

h: number

Readonly l

l: number

Readonly s

s: 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): HslColor
  • Returns number

  • Parameters

    • a: number

    Returns HslColor

combine

  • Parameters

    • that: AnyColor
    • Optional scalar: number

    Returns HslColor

contrast

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

    • Optional k: number

    Returns Color

darker

  • Parameters

    • Optional k: number

    Returns HslColor

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 HslColor

plus

  • Parameters

    Returns HslColor

rgb

  • Returns RgbColor

times

  • Parameters

    • scalar: number

    Returns HslColor

toHexString

  • toHexString(): string
  • Returns string

toString

  • toString(): string
  • Returns string

Static black

  • Parameters

    • Optional alpha: number

    Returns HslColor

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 | HslColor

Static hsl

  • Parameters

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

    Returns HslColor

Static isAny

  • Parameters

    • value: unknown

    Returns value is AnyHslColor

Static isInit

  • Parameters

    • value: unknown

    Returns value is HslColorInit

Static parse

  • Parameters

    • str: string

    Returns HslColor

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 HslColor

Static white

  • Parameters

    • Optional alpha: number

    Returns HslColor

Generated using TypeDoc