Minecraft – How to keep the same colors during daylight cycle

minecraft-java-edition

I'm trying to develop a program to mine blocks based on color recognition, but when the color has been set during the day and it's night or vice versa the color changes just enough to not recognize it. Is there a way to keep the colors similar without changing the daylight cycle setting? (I have my brightness all the way up)

Best Answer

Use a redstone clock, spamming this command:

/effect minecraft:night_vision 10 1 true