Function getRgb

  • Get the RGB values for a color.

    Returns

    an object containing the RGB values, { r, g, b }

    Parameters

    • color: Color

      the color to get the value from

    • mode: string = "decimal"

      the mode to return the values in, if no valid mode is provided it always returns decimal

      • decimal (default): each color component represented as an integer between 0-255.
      • percentage: each color component represented as a percentage
      • raw. Raw is the internal color object values, with no rounding

    Returns {
        b: number;
        g: number;
        r: number;
    }

    • b: number
    • g: number
    • r: number

Generated using TypeDoc