Fix global color state tracking.

(Fixes #24. Thanks @seandepagnier)