Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ColourRgb

Represents a colour in the red, green and blue colour model. Internal values are HDR and can eclipse the 0 to 1 range. The values are clamped when accessed.

example
Construct with 8bit values const rgb = new Rgb({ red: 128, green: 64, blue: 255}); rgb.toString(); // -> '#8040ff'

Hierarchy

  • ColourRgb

Index

Constructors

Accessors

Methods

Constructors

constructor

  • new ColourRgb(__namedParameters: object): ColourRgb

Accessors

b

  • get b(): number

g

  • get g(): number

r

  • get r(): number

Methods

__@toPrimitive

  • __@toPrimitive(hint: "string" | "number" | "default"): number | string
  • Parameters

    • hint: "string" | "number" | "default"

    Returns number | string

toHex

  • toHex(): Hex

toIHsl

  • toIHsl(): IHsl

toIRgb

  • toIRgb(): IRgb

toString

  • toString(): string

valueOf

  • valueOf(): string