I got editing with a dark background. There is still a lot of white or light grey on the screen - menu bars etc. - but if the editing window is dark at least I can hope that the light is not being focussed on my macula. Especially if I double-click the editor file tab to make the editor window bigger.
Biggest problem is, to know what you want. Last time I coded with a dark background, the text was green because that was the colour of the phosphor, so figuring out what colours I wanted was awkward. (In the end I copied some of Notepad++.)
First thing I tried, not sure I needed to do this but... it was the advice at
https://stackoverflow.com/questions/69165313/how-to-change-or-add-dark-theme-to-codeblocksSo that starts with downloading a color_themes.conf from
https://gist.github.com/yzhong52/6852140faa233408de67and installing it.
After that, I was able to select a theme in Settings | Editor | Syntax highlighting.
But then I went changing colours that I didn't like... in the end, I think I changed most of the colours which is why I'm not sure that I needed the color_themes.conf file. I had Notepad++ on another machine, and I mostly copied the colours from the theme I was using there. I had the GIMP (Other Apps Are Available) to pick colours off the screen and tell me what they were in hex. In C::B, in the syntax highlighting settings, I click Default or Comment or whatever it is, click the Foreground colour on the right, click Custom, put the hex number in.
Maybe there would be an easier way that experts would know, but that was enough for me. I'm on Linux so I don't think the "experimental dark IDE for Windows" link would be for me.