Item coloration is tied to rarity, amount of affixes or types of affixes the item has. As you upgrade an item it may also change color.
White = 0 Affixes
Blue = 1-2 affixes
Yellow = 3-4 affixes
Light Yellow = Champion Item or Personal Item
Orange Background = Unique
Green = Set item
Light Green = Reforged Item (has a Set Affix crafted on to it)
Purple Background = Exalted item, an item that has Tier 6-7 affixes. T6/7 are drop only, as highest tier you can craft is T5.
Red Background = Legendary Items, and are crafted in game.
Teal = Idol
Some other non-gear items you may see are:
Red Text with Transparent Background = Rare Consumable (keys)
Brown = Item Shard
Orange Text with Transparent Background = Rare Item Shard
Light Green Background = Set Item Shard