Skip to main content

ServerValidateColorAgainstSchema

Callable

  • ServerValidateColorAgainstSchema(Color: string, Schema: readonly string[]): string

  • Validates and returns a color against a color schema


    Parameters

    • Color: string

      The color to validate

    • Schema: readonly string[]

      The color schema to validate against (a list of accepted Color values)

    Returns string

    • The color if it is a valid hex color string or part of the color schema, or the default color from the color schema otherwise