Two colors from different segments of the color wheel are contrasting colors (also known as complementary or clashing colors). For example, red is from the warm half of the color wheel and blue is from the cool half. They are contrasting colors.
Color Theory for Beginners | Beginners Guide
In science and color theory, there are precise definitions for contrasting and complementary colors and how they appear on the color wheel. In graphic design and some other fields, we use a looser interpretation. Colors don’t have to be directly opposite or have a certain degree of separation to be considered contrasting or complementary. In design, it’s more about perception and feeling.
These opposite colors are also called complementary colors. This usually refers to a pair of colors that are directly or nearly directly opposite each other on the color wheel, such as purple and yellow.
Red and green are contrasting colors. The more transition colors separate two colors, the greater the contrast. For example, magenta and orange are not as contrasting a pair as magenta and yellow or magenta and green.