/**
 * Given a 2D list of color pixels and a target color, find the coordinates
 * of the first occurrence of the target color. If the target color is not
 * found, return null.
 *
 * @param colorList A 2D list of color pixels, where each pixel is represented
 *                  as a string in the format "R,G,B"
 * @param color The target color in the format "R,G,B"
 * @return A Pair representing the coordinates (row, col) of the first occurrence
 *         of the target color in the colorList. If the target color is not found,
 *         returns null.
 */
fun findColorCoords(colorList: List<List<String>>, color: String): Pair<Int, Int>? {

    for (row in colorList.indices) {
        for (col in colorList[row].indices) {
            if (colorList[row][col] == color) {
                return Pair(row, col)
            }
        }
    }
    return null
}
/**
 * Given a 2D list of color pixels and a target color, find the coordinates
 * of the first occurrence of the target color. If the target color is not
 * found, return null.
 *
 * @param colorList A 2D list of color pixels, where each pixel is represented
 *                  as a string in the format "R,G,B"
 * @param color The target color in the format "R,G,B"
 * @return A Pair representing the coordinates (row, col) of the first occurrence
 *         of the target color in the colorList. If the target color is not found,
 *         returns null.
 */
fun findColorCoords(colorList: List<List<String>>, color: String): Pair<Int, Int>? {
/**
 * Given a 2D list of color pixels and a target color, find the coordinates
 * of the first occurrence of the target color. If the target color is not
 * found, return null.
 *
 * @param colorList A 2D list of color pixels, where each pixel is represented
 *                  as a string in the format "R,G,B"
 * @param color The target color in the format "R,G,B"
 * @return A Pair representing the coordinates (row, col) of the first occurrence
 *         of the target color in the colorList. If the target color is not found,
 *         returns null.
 */
fun findColorCoords(colorList: List<List<String>>, color: String): Pair<Int, Int>? {

    for (row in colorList.indices) {
        for (col in colorList[row].indices) {
            if (colorList[row][col] == color) {
                return Pair(row, col)
            }
        }
    }
    return null
}