"I want a bag in a different color."
違う色 litterally means "a color that differs".
It's a little confusing coming from English, but Japanese has what is called verb-modified nouns and clauses (explained in the Genki textbooks). These are short form verbs (る•う) that are used to further describe nouns and phrases. In English the best comparison is "that." たとえば: -"This is the car THAT I [bought]." -"This is the project THAT will take forever [to complete]." -"I don't want kids WHO are always [fighting.] In each of these sentences, you can break it down to the verb and the noun THAT it is modifying. It'll take a minute to get used to, but just keep an eye out for those short form verbs (which can also be past tense!!) そして、 違う(verb; to change) 色(noun; color)のかばん。 "...the bag THAT is a differing color."
There are two points to explain. Once, some words which have kanji are written in kana : it's often because kanji are so difficult to write that people tend to use mainly kana for an easier reading and writing (if it's handwritten). It's the case for カバンand メガネ Then, you maybe learnt that all the foreign words are in katakana, but sometimes for the impact on an advertisement, presentation or something else, Japanese would use katakana instead of hiragana, since the former has more "sharpness" while the other seems "smoother" and blend more in the ground. By the way kanji looks more "fancy".
So the answer is : it's a matter of habit, and place where the word is used. I hope it helped. :)