Pote.Validator.HWB (Pote v3.0.0)

Copy Markdown View Source

HWB (Hue-Whiteness-Blackness) color string validation.

Splits out HWB-specific validation from Pote.Validator.

Not part of the public API — used only by Pote.Validator.

Summary

Functions

Returns error messages for HWB validation errors.

Validates an HWB color code: H,W,B (H: 0-360 degrees, W/B: 0.0-1.0).

Functions

error_message(atom)

@spec error_message(atom()) :: String.t()

Returns error messages for HWB validation errors.

validate(code)

@spec validate(String.t()) :: :ok | {:error, atom()}

Validates an HWB color code: H,W,B (H: 0-360 degrees, W/B: 0.0-1.0).