CotEditor colors the code elements in the following order: 1) keywords, 2) commands, 3) types, 4) attributes, 5) variables, 6) values, 7) numbers, 8) strings, 9) characters, 10) comments
When your document contains an item to be colored which matches multiple categories (e.g. keywords and commands), the color of the latter in the order will overwrite the former's.