This will work for hardware that doesn't have software that can change the colour temperature or if you don't want to deal with potential software issues, e.g. some of the dithering that people said became visible with f.lux though that hasn't been an issue for me.
Most monitors have a custom RGB preset that you can change. If you want a colour temperature of 4200K for example, then set R to 100, G to 84, B to 68. 3400K can be set as R to 100, G to 76 and B to 51.
This is not at all an exact number because all monitors differ from each other, but it's certainly a starting point if you need one.