Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Color

Hierarchy

Index

Constructors

constructor

  • new Color(red?: number, green?: number, blue?: number, alpha?: number): Color
  • Parameters

    • Default value red: number = 0
    • Default value green: number = 0
    • Default value blue: number = 0
    • Default value alpha: number = 1

    Returns Color

Properties

alpha

alpha: number

blue

blue: number

green

green: number

red

red: number

Static BLACK

BLACK: Color = new Color(0, 0, 0)

Static BLUE

BLUE: Color = new Color(0, 0, 255)

Static CYAN

CYAN: Color = new Color(0, 255, 255)

Static GREEN

GREEN: Color = new Color(0, 255, 0)

Static MAGENTA

MAGENTA: Color = new Color(255, 0, 255)

Static PRINT

PRINT: Color = new Color(55, 58, 60)

Static RED

RED: Color = new Color(255, 0, 0)

Static WHITE

WHITE: Color = new Color(255, 255, 255)

Static YELLOW

YELLOW: Color = new Color(255, 255, 0)

Static defaultMaxListeners

defaultMaxListeners: number

Accessors

contents

Methods

addListener

  • addListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

appendChild

  • appendChild(child: Element): void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]
  • Returns ( string | symbol ) []

getHref

  • getHref(): string | undefined

getID

  • getID(): string | undefined

getMaxListeners

  • getMaxListeners(): number
  • Returns number

getOrigin

  • getOrigin(): string | undefined

getTypeName

  • getTypeName(): string | undefined

getTypeURI

  • getTypeURI(): string | undefined

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

merge

on

  • on(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

once

  • once(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeChild

  • removeChild(child: Element): boolean

removeListener

  • removeListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

setID

  • setID(ID: string | undefined): void

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

setOrigin

  • setOrigin(origin: string): void

setTypeName

  • setTypeName(name: string | undefined): void

setTypeURI

  • setTypeURI(uri: string | undefined): void

toCanvasStyle

  • toCanvasStyle(): string | CanvasGradient | CanvasPattern

toHex

  • toHex(): string

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc