iOS 9.3 introduced a feature last year called Night Shift that reduces the blue output of your screen at night, which is believed to reduce the interference of screens on your sleep patterns. A couple of weeks ago Apple released macOS Sierra 10.12.4, which brings this feature to the Mac.
To enable it go to the Apple menu > System Preferences > Displays (second row) > Night Shift tab. From here you can set it to a custom schedule, such as from sunrise to sunset, and you can adjust to what extent the color is distorted. It only works with built-in Apple displays.
You can also manually enable it from the Today Panel. Click the bullet list icon in the extreme top right corner of your screen, near your WiFi and Spotlight. Switch to the “Today” tab if you aren’t there already, and scroll up. It’s hidden above the top of the Today Panel.
I should note that the research on its effectiveness is disputed. Personally, I just prefer the aesthetics of the warm glow at night that is closer to an incandescent bulb, whether or not the science says it’s better for me.