Wanted to play with the color sensor without having to use roborio so i put together this sketch. Be aware it requires a 3v3 arduino to use otherwise you might damage the color sensor. It has code to detect the closest color of the pre-defined selection
Reddit X-post: https://www.reddit.com/r/FRC/comments/elnuiq/color_sensor_arduino_code/