Red and green are not opposite colors in optics, the opposite and complementary color to red is cyan:
But the pure cyan color has more luminosity than red, this causes green to be used as the equivalent opposite. The same goes for green and magenta, its opposite / complementary.
Perception works differently than optics, and red and green can offer opposite meanings. Everyone knows that surgeons use green uniforms to optically counteract the intensity of blood red. But there are also blue uniforms, and not just any blue, but a blue with a tonal value similar to red or darker:
Talking about color and their screen implementation, the red-green choice at the same tonal value is not effective in the percentage of population with deuteranopia, the most common color blind disability, for all of them the two buttons will have the same meaning:
If the buttons don't have opposite actions, I would try to find combinations that do not interfere their operation with some extra meaning. Here are some examples using red as a base in the column on the left and green on the right:
And here the respective color perception incapacity test: