CodeMirror helps provide what the notebook is using for the code highlighting that you experience, see here. I’m trying to locate more about where the color codes are detailed. So far this is closest I’ve found. (UPDATE: There is also some listed here in this later answer to a different question with indication on where to find them.)
Based on “The pygments theme in use mimics JupyterLab’s codemirror mode with the same CSS variables” in the post here another place to dig around to find the colors may be in nbconverts use of pygments to make HTML. In this regard, the preview generation code at the bottom of this section seems nice; however, on the test Binder instance I was looking at first listing of default
didn’t quite match with the notebook cells if you paste those four lines in the test code
block in a notebook. (print
is green when pasting it in a cell results in print
being red.) Plus, this suggests a place to look for the conversion css and templates nbconvert uses.