Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Color

Index

Functions

fromArgb

  • fromArgb(a: number, r: number, g: number, b: number): Color
  • Create a new color from individual ARGB components, each in the range 0-255.

    Parameters

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

    Returns Color

fromHex

  • fromHex(hex: string): Color

fromName

  • fromName(name: string): Color
  • Create a color from its name, as defined by the following schemes:

    • A string of the form x:A:R:G:B, where x is any text not containing a colon, and ARGB are integers between 0 and 255.
    • A string of the form x:name, where x is as above and name is lowercased and re-evaluated by this function.
    • A hex code of the form #RRGGBB. Alpha is 255.
    • A hex code of the form AARRGGBB, with no hash mark.
    • The name of one of the HTML Known Colors in lowercase (https://www.w3schools.com/colors/colors_names.asp)
    • Otherwise, white.

    Parameters

    • name: string

    Returns Color

fromSimpleHex

  • fromSimpleHex(hex: string): Color

load

  • load(name: string): Color

Generated using TypeDoc