sticknodes-js API Documentation - v1.0.10
    Preparing search index...

    Class Color

    Index

    Properties

    alpha: number
    blue: number
    green: number
    red: number

    Methods

    • Creates a new color from RGBA values.

      Parameters

      • red: number
      • green: number
      • blue: number
      • alpha: number

      Returns Color

    • Creates a new color from RGB values (assumes alpha is 255).

      Parameters

      • red: number
      • green: number
      • blue: number

      Returns Color

    • Creates a new color from a hex string. The string can be in the formats: "#RGB", "#RGBA", "#RRGGBB", "#RRGGBBAA", "RGB", "RGBA", "RRGGBB", or "RRGGBBAA" (case-insensitive). Any other format will fail.

      Parameters

      • hex: string

      Returns Color

    • Returns void

    • Converts the color to a hex string.

      Returns string