How to identify unique weapons and adding color to item name

I'm adding a feature to my plugin, but it needs to be able to tell weapons apart (Like telling one pump shotgun from another) how would I go about doing that?

Like "-1214542497" for HMLMG, but unique for each HMLMG so the plugin can tell them apart.

 

I was also wondering how I would now handle having custom colors in an item name, I used to have it working, but it stopped working a while ago. Was support for colors in item names (Like having the name of a revolver blue when you click on it in your inventory) dropped? I had it working, but the way I was doing it no longer works and I can't find anything about it.

You can't have colors in weapon names anymore