Function generateRandomColors

  • Generates a random set of colors with an optional format.

    Parameters

    • count: number

      Number of colors to generate.

    • options: {
          bounds?: number | number[] | {
              b: number;
              g: number;
              r: number;
          };
          distribute?: boolean;
          format?: "hex" | "rgb" | "nrgb";
      } = {}

      Object containing optional parameters.

      • Optionalbounds?: number | number[] | {
            b: number;
            g: number;
            r: number;
        }

        The bounds for color transformation.

      • Optionaldistribute?: boolean

        Whether the colors should be evenly distributed.

      • Optionalformat?: "hex" | "rgb" | "nrgb"

        The format of the output colors ('hex', 'rgb', 'nrgb').

    Returns (string | [number, number, number] | number[])[]

    An array of colors in the specified format.