When performing syntax coloring, 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.