That’s really tough. For me I use a display that has an ambient light sensor so it matches my surroundings, that might help a bit.
Ideally your environment is balancing the light level of your monitor (maybe 50% black level) so you can have something that works if it’s a white display window or dark.