Gleam - v1.0.2
    Preparing search index...

    Function rgb2Int

    • Pack (r, g, b[, a]) channels into a single integer key. RGB are 0-255. Alpha is 0-1 (CSS convention); divide canvas byte-alpha by 255 before passing. Without alpha: 24-bit RGB. With alpha: 32-bit RGBA (forced unsigned). Useful for fast per-pixel lookups: cheaper than building a hex string.

      Parameters

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

      Returns number