Most code editors ship with its own color scheme. Basically all editors also allow you to change out the color scheme, and many people do. If we look at the most popular schemes, one commonality between almost all of them is that the color of code comments has low contrast with the background.
According to the WebAIM contrast cheker, for "normal text" you need a contrast of 4.5 for AA and 7.0 for AAA. Let's see how common editors and their commonly used color schemes fare.
Neovim 0.10 shipped a new default color scheme. I've pulled the colors from my own neovim (ran without a config) in iterm2; it looks like this:
VS Code is an extremely popular editor with a bunch of color schemes. Here's some of the built-in ones that have many variations, and two well known ones:
Cursor is the new cool LLM based editor. It's front-page conists mostly of light color schemes, but on /features there's images of a dark scheme as well. It looks like this: