Sanitize a CSS color value, returning a fallback if validation fails.
Delegates to isValidCssColor for validation. If the color
is not a recognized safe format, the fallback value is returned
instead (defaulting to "inherit").
Parameters
color: string
The CSS color value to sanitize.
fallback: string = "inherit"
The value to return if validation fails (default "inherit").
Returns string
The original color if valid, otherwise the fallback.
Sanitize a CSS color value, returning a fallback if validation fails.
Delegates to isValidCssColor for validation. If the color is not a recognized safe format, the fallback value is returned instead (defaulting to
"inherit").