No, its not legal. Any modification that lowers the light output of the tailights is illegal. Will you get a ticket for it, probably not unless you go crazy with it. I've done many of them here at the shop and only one person ever got a ticket for it and that's because he wanted them really black. I've found that doing a test light first to find the desired tint and then doing the real lights with 2-3 heavier coats gives the best results. It keeps the lights from looking dull, then spray with medium coats of clear and it will be nearly as shiny as they were before.
Ryan