The common mixing of RGB colors is very different from mixing colors for paintings, it\'s mixing of light instead mixing of pigments.
For example:
Bl
Check this implementation for additive, substractive and other mixing alghoritms.
Is fully functional (writed in java), so you can test whatever colors you need to mix, and see if it fit your needs.
As other responses pointed, Blue + Yellow (exactly Cyan + Yellow) is Green on substractive CMYK alghoritm. See by yourself