src/main/java/frc/team5431/titan/core/sensors/ColorSensor.java
public int findColorMatch() {
        int position = -1;

        Color detected = getColor();

        for (int i = 0; i < m_Colors.length; i++) {
            ColorMatchResult match = m_colorMatcher.matchClosestColor(detected);
            if (match.color == m_Colors[i]) {
                if (match.confidence >= m_Confidence)
                    position = i;
            }
        }
        
        if (position == -1)
            Logger.e("WARNING: No Color Found in TitanUtil's Color Sensor");

        return position;
    }
/**
     * 
     * @return the integer returned will be equal to the position in the color
     * array passes to the constructor. Will return -1 if the confidence in not high enough.
     */
@return the integer returned will be equal to the position in the color
array passes to the constructor. Will return -1 if the confidence in not high enough.
@return the integer returned will be equal to the position in the color array passes to the constructor . Will return - 1 if the confidence in not high enough .
public int findColorMatch() {
        int position = -1;
        Color detected = getColor();
        for (int i = 0; i < m_Colors.length; i++) {
            ColorMatchResult match = m_colorMatcher.matchClosestColor(detected);
            if (match.color == m_Colors[i]) {
                if (match.confidence >= m_Confidence)
                    position = i;
            }
        }
        if (position == -1)
            Logger.e("WARNING: No Color Found in TitanUtil's Color Sensor");
        return position;
    }
public int findColorMatch ( ) { int position = - 1 ; Color detected = getColor ( ) ; for ( int i = 0 ; i < m_Colors . length ; i ++ ) { ColorMatchResult match = m_colorMatcher . matchClosestColor ( detected ) ; if ( match . color == m_Colors [ i ] ) { if ( match . confidence >= m_Confidence ) position = i ; } } if ( position == - 1 ) Logger . e ( "WARNING: No Color Found in TitanUtil's Color Sensor" ) ; return position ; }
@return the integer returned will be equal to the position in the color
 array passes to the constructor.
@return the integer returned will be equal to the position in the color array passes to the constructor .