I see a lot of repetitive code and faulty assumptions regarding colors, which are handled often within ES/JS, because of its close association with CSS. For many coders, a color apparently is always a 24-bit sRGB value expressed as a 6-digit hexadecimal number (or 3-tuple) preceded by a hash sign, e.g. #ABCDEF
or #f00ba7
.
I believe this could be improved a lot if there was a Color
"datatype" built into ES-262, similar to Number
or Date
, or at least a global object Color
that provided common functions like Math
does.