Why is the opposite of yellow on color wheels sometimes purple and sometimes blue?
Why do traditional color wheels have yellow opposite to violet (purple), whereas graphics programs such as Adobe Photoshop have yellow opposite to blue?
Yellow opposite violet (purple):
Yellow opposite blue:
The traditional wheel is based on pigments. It's the mix of the primary colors that creates the secondary and tertiary colors in the wheel. That's your first picture.
The second picture is based on the RGB colors and are colors produced by light; they're not "mixed" together and technically don't work the same way as pigments. It might be better to call this wheel a spectrum than a color wheel. By definition they're not really complementary but opposite.
So in general, when people talk about complementary, they still refer to the traditional model: purple and yellow, orange and blue, red and green.
By the way, that "blue" from the RGB wheel is still very close to be a purple in CMYK; but in RGB, it's a blue. The violet on the traditional wheel is also a very pale violet... The wheel below is closer to the real traditional color wheel!