Color.InvalidComponentError exception (Color v0.4.0)

Copy Markdown

Raised when one or more channel values fall outside the legal range for a color space, are the wrong numeric type, or contain NaN / infinity.

Has fields:

  • :space — the color space being constructed (a short atom like :srgb or a friendly label like "Lab").

  • :value — the offending list (or single value).

  • :range — a {lo, hi} tuple naming the legal range, when applicable. nil for type-mismatch or NaN errors.

  • :reason:out_of_range, :mixed_types, :not_numeric, :integers_not_allowed, :nan, or :infinity.