Posted September 30, 2025 by crabsThatPrintMoney
I found myself running into the same problem over and over again when testing this, which was that the color detection just did not work sometimes. Turns out the reason for this is that rendering a video and then looking at what you rendered to get the colors is a bit iffy in how exact the color values you get back are. now in the colorLink array:
[ ['rgb(0, 0, 0)', 'kill', 10], // kill the player when touching a color close to black ['rgb(255, 255, 255)', 'kill', 10] // kill the player when touching a color close to white ]
There is a third value specifying how exact the color has to be to count. I usually just set it to ten for everything but less will probably work, and more will allow for shading without specifying each individual color.