refactorinc color.js, correct semantics