/**
 * This exercise aims to test your knowledge on modifying elements of a list and iterating over a specific range.
 *
 * You are given a list of RGB colors. Your task is to modify each color by incrementing the red, green, and blue values of each color by a specific range.
 *
 * Write a function that takes in a list of colors and returns the modified list of colors.
 *
 * Example:
 *
 * input:
 * colors = listOf(
 *     Triple(255, 0, 0),
 *     Triple(0, 255, 0),
 *     Triple(0, 0, 255)
 * )
 *
 * output:
 * modifiedColors = listOf(
 *     Triple(255, 100, 100),
 *     Triple(100, 255, 100),
 *     Triple(100, 100, 255)
 * )
 */
fun colorGradient(colors: List<Triple<Int, Int, Int>>): List<Triple<Int, Int, Int>> {

    val range = listOf(100, 200, 300)
    val modifiedColors = mutableListOf<Triple<Int, Int, Int>>()

    for (i in colors.indices) {
        val color = colors[i]
        val modifiedColor = Triple(color.first + range[i], color.second, color.third)
        modifiedColors.add(modifiedColor)
    }

    return modifiedColors
}
/**
 * This exercise aims to test your knowledge on modifying elements of a list and iterating over a specific range.
 *
 * You are given a list of RGB colors. Your task is to modify each color by incrementing the red, green, and blue values of each color by a specific range.
 *
 * Write a function that takes in a list of colors and returns the modified list of colors.
 *
 * Example:
 *
 * input:
 * colors = listOf(
 *     Triple(255, 0, 0),
 *     Triple(0, 255, 0),
 *     Triple(0, 0, 255)
 * )
 *
 * output:
 * modifiedColors = listOf(
 *     Triple(255, 100, 100),
 *     Triple(100, 255, 100),
 *     Triple(100, 100, 255)
 * )
 */
fun colorGradient(colors: List<Triple<Int, Int, Int>>): List<Triple<Int, Int, Int>> {
/**
 * This exercise aims to test your knowledge on modifying elements of a list and iterating over a specific range.
 *
 * You are given a list of RGB colors. Your task is to modify each color by incrementing the red, green, and blue values of each color by a specific range.
 *
 * Write a function that takes in a list of colors and returns the modified list of colors.
 *
 * Example:
 *
 * input:
 * colors = listOf(
 *     Triple(255, 0, 0),
 *     Triple(0, 255, 0),
 *     Triple(0, 0, 255)
 * )
 *
 * output:
 * modifiedColors = listOf(
 *     Triple(255, 100, 100),
 *     Triple(100, 255, 100),
 *     Triple(100, 100, 255)
 * )
 */
fun colorGradient(colors: List<Triple<Int, Int, Int>>): List<Triple<Int, Int, Int>> {

    val range = listOf(100, 200, 300)
    val modifiedColors = mutableListOf<Triple<Int, Int, Int>>()

    for (i in colors.indices) {
        val color = colors[i]
        val modifiedColor = Triple(color.first + range[i], color.second, color.third)
        modifiedColors.add(modifiedColor)
    }

    return modifiedColors
}