As long as they are both either A. percula or A. ocellarius, you will be fine.
Many of the "black" perculas are actually ocellarius (or "false" perculas) so mixing one of them with a true perc would not work. The "onyx" clowns are just a color variant of percula clowns so mixing one of them with a perc would work just fine.