Move the smart color picking to ceci-ui.js

This required making some minor changes to the ordering of what callbacks are used when,
which seem to be innocuous.