How to tone yellow and blue

With most of my colours I’ve been having luck shifting my shadows towards blue and my highlights towards yellow. I’m a coder so I like to be mathematical about it although I’m finding that I have to break my own rules in places - some shades need more desaturating to give a better contrast for the highlight and I’ve been hue shifting the yellow less than other colours but I’m still not happy, even with only 5 degrees of hue shift, the shadows are very definitely green and the highlight is orange.