/**
 * Given a list of colors and a boolean condition, return a filtered list of colors that satisfy the condition.
 *
 * @param colors A list of colors represented as strings.
 * @param condition A boolean condition to filter the colors. It can be one of the following conditions:
 *                  - 'bright': Filter colors that are considered bright.
 *                  - 'dark': Filter colors that are considered dark.
 * @return The filtered list of colors satisfying the given condition.
 */
fun filterColors(colors: List<String>, condition: String): List<String> {

    val brightColors = listOf("white", "yellow", "pink", "sky blue")
    val darkColors = listOf("black", "gray", "navy blue", "dark brown")

    val filteredColors = mutableListOf<String>()

    when (condition) {
        "bright" -> filteredColors.addAll(colors.filter { it in brightColors })
        "dark" -> filteredColors.addAll(colors.filter { it in darkColors })
    }

    return filteredColors
}
/**
 * Given a list of colors and a boolean condition, return a filtered list of colors that satisfy the condition.
 *
 * @param colors A list of colors represented as strings.
 * @param condition A boolean condition to filter the colors. It can be one of the following conditions:
 *                  - 'bright': Filter colors that are considered bright.
 *                  - 'dark': Filter colors that are considered dark.
 * @return The filtered list of colors satisfying the given condition.
 */
fun filterColors(colors: List<String>, condition: String): List<String> {
/**
 * Given a list of colors and a boolean condition, return a filtered list of colors that satisfy the condition.
 *
 * @param colors A list of colors represented as strings.
 * @param condition A boolean condition to filter the colors. It can be one of the following conditions:
 *                  - 'bright': Filter colors that are considered bright.
 *                  - 'dark': Filter colors that are considered dark.
 * @return The filtered list of colors satisfying the given condition.
 */
fun filterColors(colors: List<String>, condition: String): List<String> {

    val brightColors = listOf("white", "yellow", "pink", "sky blue")
    val darkColors = listOf("black", "gray", "navy blue", "dark brown")

    val filteredColors = mutableListOf<String>()

    when (condition) {
        "bright" -> filteredColors.addAll(colors.filter { it in brightColors })
        "dark" -> filteredColors.addAll(colors.filter { it in darkColors })
    }

    return filteredColors
}