optimize JS/color