Why are red, yellow, and blue the primary colors in painting but computer screens use red, green, and blue?
First of all, you can define any colors you want to be the "primary colors" of your color system, so that other colors are obtained by mixing the primary colors. Although there may be an infinite number of color systems, they are not all equally useful, practical, or effective. For instance, I am free to create a color system where I define light blue, medium blue, and violet as my primary colors. Even though I am free to define my primary colors as such, this color system is not very useful in general because no amount of mixing of these primary colors will produce red, orange, yellow, etc. Therefore, we should make a distinction between a color system and an effective color system. The effectiveness of a color system is best measured as the number of different colors that can be created by mixing the primary colors of the system. This set of colors is called the "color gamut" of the system. A color system with a large gamut is more able to effectively represent a wide variety of images containing different colors.