Overhaul definition scripts.
cw.lua.in: fix an error message and clarify a variable name
cw.lua.in: improve default color set.