You will need to perform a series of conversions to get what you want. Here I show you how to use pictures to get a very rough answer. But it should work for what you want.
First for each type of star, you need to know its surface temperature. You can get that from this Hertzsprung-Russell diagram I copied from https://www.mtsu.edu/physics/Astronomy/prelab9_HR_diagram.php.
For example, you can see that a G type star like the Sun has a temperature of about 6000 C.
Then for each surface temperature, you need to find what color is emitted. Here is the C.I.E. 1931 Chromaticity Diagram. This is a standard chart, but this copy has some extra notes on it. I downloaded it from https://www.ledtronics.com/html/1931ChromaticityDiagram.htm. For any color, you can see what the X and Y color coordinates of that color are.
The black line in the middle is the colors of blackbodies at various temperatures. 6500 C corresponds to white light. This is about the temperature of the Sun. You can see that the X,Y coordinates of this point are about 0.33,0.33.
For other temperatures, see the yellow numbers along the bottom. Find the temperature you want and go straight up to the black line. That shows you the color and allows you to find the X and Y color coordinates.
Next you need to convert from X,Y to RGB. Here is a website that helps. RGB/xy Color Conversion. It shows the same Chromaticity diagram. There is a + on it that you can drag around with your mouse. As you drag it, the X,Y and RGB values are calculated.
If you know X,Y, drag the + until you hit it (or get close enough). The RGB you need is displayed. For 0.33,0.33, I get RGB is 255,235,226. Here is a screenshot.
In summary,
G type star
-> 6000 C
-> X,Y = 0.33,0.33
-> RGB = 255,235,226