Skip to main content

ServerValidateColorAgainstSchema

Callable


  • Validates and returns a color against a color schema


    Parameters

    • Color: BCColor

      The color to validate

    • Schema: readonly BCColor[]

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

    Returns BCColor

    • 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