This question was closed because it was marked as a duplicate of similar questions. However, I don't feel that it actually was a duplicate. This author was specifically asking about using precise RBG colors, not the standard 4-bit color pallet. He also explicitly references the ANSI escape color codes, as being insufficient, because the color pallet is too small. However, his question was marked as a duplicate of other answers explaining how to use the limited 4-bit color pallet.
I have composed a more specific answer which speaks to his precise needs, and explains how to use newer revisions of the ANSI standard, to explicitly use 24-bit "true color" RGB ANSI escape codes. And I originally found his question, because I had the same issue and the existing answers suggesting the 4-bit color pallet were insufficient.
Is it possible to have this question re-opened so that I can answer it?