Latest Android has that built-in as a "Night Mode". You can also set a schedule or have it enable while charging
It's a Samsung, Android phone. I used "Modes and Routines" which allows to set greyscale (and silent mode etc.) and automate triggers (such as time of day) to activate a "mode".