Actually, the game has examples of both forms. Look at dynasty #2, Orsini and # 7, Ottoman, both at the top of common/dynasties/00_dynasties.txt.
For the COAs that are just a string of numbers:
• 'religion = X' tells the game which "culture" group in interface/coats_of_arms.txt this COA uses. Obviously, 'zoroastrian' tells it to use the one for 'religion_group = "zoroastrian_group"'.
• The 1st number in the data chooses the template within that culture. Under zoroastrian_group, 0 uses the template "coa_plain_muslim:1", while 1 uses "coa_plain_pagan:1". Both are simple circular COAs, so I don't know why it lists both. The ":1" at the end of each of those tells us there is 1 layer for that template. Your 0 chooses the muslim plain circle over the identical pagan plain circle.
• Each group of 6 numbers after that defines a layer. Within a group it's: texture, emblem, texture_internal, color (1), color (2), color (3). These are used exactly as Measter described in the OP. Because the zoroastrian_group only lists 2 textures, they are numbered 0 and 1. You have 2. At best, the game will wrap that around to 0, at worst it will cause a crash.
Important point about that: for many things, computers use 0-based counting instead of 1-based. You have to count 0, 1, 2, 3, etc. In COAs, template, texture, texture_internal, emblem, and color are all 0-based.
The reason you appear to see more colors is that the game tends to wrap numbers around. zoroastrian_group only has 14 colors defined (0 thru 13), so when you tell it to use 14, it uses 0. Tell is 15, it uses 1. Tell it 103, it uses 5. Any number greater than 13, subtract 14 repeatedly until it's less than 14: 103-14*7 = 5 ⇒ black. (I've never tried it, but I suspect if you give it a negative number, it will add 14 until it's not negative, because there's a simple math that handles both without actually repeating. I expect non-integers (5.4) will get either truncated or rounded.)
edit: So your basic error here appears to be using the non-existent texture 2 in a zoroastrian_group COA.