Yellow is a confident colour, and the trick is balancing it rather than competing with it. The strongest move is to reach for its complementary opposite on the colour wheel: blue and violet. That's not interior-designer waffle — opposites genuinely make each other look richer, and a deep blue or dusky purple next to yellow gives you proper contrast without clashing.
For a navy that holds its own against yellow, Paint & Paper Library's Blue Blood (LRV 16.4) is a cracking choice — inky, grown-up, brilliant on a feature wall, woodwork or a piece of furniture in a yellow room. If you want something a touch more atmospheric and jewel-like, Dulux's Night Jewels 4 (LRV 34.1) reads as a deep teal-blue and sits beautifully against warm yellows.
Want to be braver? Mylands FTT-019 - Ultra Violet (LRV 15.6) is the textbook complementary partner — yellow and violet are direct opposites, so this pairing has real punch. Use it as an accent rather than wall-to-wall unless you've got a big, light-flooded space and the nerve for it.
Now the "but what about" question: most yellow rooms don't want three bold colours fighting at once. So balance the drama with neutrals. A warm off-white on the ceiling and trim keeps things crisp, and a soft greige on adjoining walls gives the eye somewhere to rest. Avoid cool, blue-toned greys with yellow — they can look a bit clinical against the warmth. Reach for warmer, mushroomy neutrals instead.
Practical advice: decide your yellow's temperature first. A buttery, ochre yellow loves navy and warm white. A sharper, lemony yellow takes violet and cooler accents better. Then test your contrast colour on a board next to the actual wall in both daylight and lamplight before committing — yellow bounces a lot of light around and can throw a colour cast onto whatever's beside it.