I learnt after reading How do color filters placed in front of a light source,change the color of light that passes through? colour filter work by permitting only one colour and absorbing or reflecting the rest. In this sense, a yellow colour filter works by allowing only yellow colour to pass thorough and not allowing the rest of the colours.
Let us consider the following image:
It can be seen that yellow colour is obtained as a result of red and green colours. In order for the yellow filter to transmit yellow colour both red and green colours must be transmitted. So, does it mean "only" yellow (but not blue or red) filters cannot be obtained? I think yellow colour filters are a reality. How does a yellow colour filter work in the sense of RGB colour model? Does the yellow coloured light coming out of a yellow filter have red and green coloured components in it?
Image Courtesy: Additive and Subtractive Colour Mixing