Re:Scrub values in JavaScript live
by shakeel_mohamed on Wednesday November 28, 2012 @03:42AM
(#4841599)
Nice! Just a thought, values can go beyond the valid range. For example: dividing by zero, having negative values for RGB, and negative height/widths.
[ Parent
| on HN ]
Unfortunately there's no type information in JS, so it's very difficult to extract range data from just the source. Just don't drag it into that range ;)
PS, I'm planning to implement a color picker for strings like 'rgba(200,0,234,0.4)'
How does scrubby know the alpha value is real-valued (not integral)?