extracted CIE conversion steps to function

Refactored to eliminate repetition in color.js, added putGroupAction
function for turnOnAll and turnOffAll operations (group state vs
lamp-by-lamp).