Closed subzey closed 3 years ago
As I can see, Colord is generally very tolerable to the garbage input. But the NaN values (and ones that are coerced to NaN) are not handled:
colord({r: 'foo', g: 'bar', b: 'baz'}).toRgb() { r: NaN, g: NaN, b: NaN, a: 1 }
colord({r: 'foo', g: 'bar', b: 'baz'}).toHex() '#NaNNaNNaN'
This is a proposed fix: To treat NaN values as a finite lower bound in clamp()
clamp()
Smart! I owe you a beer 🍻
As I can see, Colord is generally very tolerable to the garbage input. But the NaN values (and ones that are coerced to NaN) are not handled:
This is a proposed fix: To treat NaN values as a finite lower bound in
clamp()