Summing this up in a few bullet points
- Gear shells (orange items and slotted purple items) derive all meaningful stats from their mods. Blue mods? Blue-level item. Purple mods? Purple-level item.
- This includes armor rating and weapon damage. Armor rating is derived from the armoring mod. Weapon damage from the barrel mod for guns and hilt mod for sabers.
- Make sure you have "Show Detailed Item Tooltips" checked in your preferences. It's under User Interface -> Tooltips. This makes it so you see the summed stats on a modded item and the stats on the mods (so you don't have to open up the modding interface to compare.
- All this said, the best gear is either a purple item or a modded item with purple mods (and by the time you get to 50, all purples are modded anyway) with an edge given to modded items with purple mods because of choosing your stats.
- Yes, that does mean level 27 green item might be better than your level 15 modded purple gear, but that's solely because of level. If you get a blue or purple modded level 27 item, it will be better.