Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IColor

色情報

Color info

Hierarchy

  • IColor

Implemented by

Index

Properties

a

a: number

透明度 / Alpha

b

b: number

青 / Blue

g

g: number

緑 / Green

r

r: number

赤 / Red

Readonly rgb

rgb: string

色情報の16進数表現 (RGB) / Hex string (RGB)

Readonly rgba

rgba: string

色情報の16進数表現 (RGBA) / Hex string (RGBA)

value

value: number

色情報の 32 bit 表現 / Color info in 32 bit integer

Methods

eq

  • Parameters

    • color: IColor

      色情報 / Color

    Returns boolean

    色情報が一致するか否か / Whether the specified color info matches the current info

from

  • from(color: string | number | IColor): void
  • 色情報をセットする

    Set color info

    Parameters

    • color: string | number | IColor

      色情報 / Information source

    Returns void

fromNumber

  • fromNumber(val: number, withAlpha?: boolean): void
  • 色情報をセットする

    Set color info

    Parameters

    • val: number

      色情報の数値表現 / Information source in number

    • Optional withAlpha: boolean

      透明度付きか否か / Whether alpha value is included or not

    Returns void

fromString

  • fromString(color: string): void
  • 色情報をセットする

    Set color info

    Parameters

    • color: string

      色情報の文字列表現 / Information source in string

    Returns void

toString

  • toString(withAlpha?: boolean): string
  • 色情報の文字列表現を得る

    Retrieve string representation of this color info

    Parameters

    • Optional withAlpha: boolean

      透明度付きにするか否か / Whether to include alpha value or not

    Returns string

Generated using TypeDoc