Intermediate colours on an RGB colour wheel are produced by mixing equal intensities of adjacent pairs of colours.
Secondary colours are created by mixing two primary colours in equal amounts. The RGB secondary colours are yellow (red + green), cyan (green + blue) and magenta (red + blue).
Tertiary colours are created by mixing a primary colour with a secondary colour. For example, mixing equal amounts of red and yellow creates the tertiary colour orange.
The range of colours that can be produced by an RGB colour wheel is limited only by the system of notation and the resolution of the device they are displayed on.
The best way to find the correct code for an intermediate colour on a colour wheel is to work from a table (calculate a colour) or swatches (visually match a colour). You can find examples of tables here.