Function colorToDataUrl

  • Creates an image data url from a color string.

    Parameters

    • color: string

      color string (css compatible color)

    • width: number = 1

      width of the image (default: 1)

    • height: number = 1

      height of the image (default: 1)

    Returns string

    • data url