Mazda codes can be found on the parts ID sticker inside the door around the bottom middle. They are usually two or three characters with letters and numbers, like 41W.
You can also find your car's color code by providing the last 8 digits of your VIN to the parts department of your local Mazda dealership and they will be able to tell you what the color is.