• Parameters

    • string: string

      a CSS/SVG color string in any form

    Returns number[]

    red green blue values between 0 and 255, with possible 4th value between 0 and 1.

    Description

    input a color as a string and get back the RGB values as three numbers in an array. This supports CSS/SVG color strings like named colors, hex colors, rgb(), hsl().