@blockchaincommons/multipart-ur - v1.0.0-beta.3
    Preparing search index...

    Class Color

    An 8-bit RGBA colour. Instances are frozen.

    Index
    • Each channel must be an integer 0–255 (InvalidColor otherwise); a defaults to 255.

      Parameters

      • r: number
      • g: number
      • b: number
      • a: number = 255

      Returns Color

    r: number

    Red, 0–255.

    g: number

    Green, 0–255.

    b: number

    Blue, 0–255.

    a: number

    Alpha, 0 (transparent) to 255 (opaque).

    BLACK: Color = ...

    Opaque black, the default foreground.

    WHITE: Color = ...

    Opaque white, the default background.

    TRANSPARENT: Color = ...

    Fully transparent black.

    • get isTransparent(): boolean

      Alpha below 3 of 255 counts as transparent (the logo's clear colour falls back to white).

      Returns boolean

    • A colour from #RGB, #RRGGBB or #RRGGBBAA (the # is optional); InvalidColor otherwise.

      Parameters

      • s: string

      Returns Color

    • Whether every channel is equal.

      Parameters

      Returns boolean

    • #RRGGBB, or #RRGGBBAA when not fully opaque (the reference's Display).

      Returns string