• Returns a serialization of the color that can actually be displayed in the browser. If the default serialization can be displayed, it is returned. Otherwise, the color is converted to Lab, REC2020, or P3, whichever is the widest supported. In Node.js, this is basically equivalent to serialize() but returns a String object instead.

    Parameters

    • color: ColorTypes
    • param1: {
          space?: string | Space;
      } & Record<string, any> = {}

      Options to be passed to serialize()

    Returns Display

    String object containing the serialized color with a color property containing the converted color (or the original, if no conversion was necessary)