I am trying to code the Color Sensor V3 by Rev Robotics in java. I am using the exact same code from this github except I changed my color values a bit. The issue is that the color sensor is not reading perfect values. For each color, I am getting around .5 with or without the modified code. It does change from color to color so the sensor is working.
private final Color kBlueTarget = ColorMatch.makeColor(0.142, 0.437, 0.421);
private final Color kGreenTarget = ColorMatch.makeColor(0.177, 0.577, 0.253);
private final Color kRedTarget = ColorMatch.makeColor(0.482, 0.369, 0.149);
private final Color kYellowTarget = ColorMatch.makeColor(0.314, 0.552, 0.134);
What should these values be? I tried setting them to the color value that the sensor was reading without any modifications and this still doesn’t seem to help the sensor.