/**
 * Given a designer name and a list of design options, return a list of colors that the designer
 * has used in their designs.
 *
 * @param designerName The name of the fashion designer
 * @param designOptions A list of design options available
 * @return A list of colors used by the designer
 */
fun findColorsForDesigner(designerName: String, designOptions: List<String>): List<String> {

    val colorsUsed = mutableListOf<String>()

    for (design in designOptions) {
        if (designerName in design) {
            val words = design.split(" ")

            for (word in words) {
                val colorList = listOf("red", "blue", "green", "yellow", "purple", "orange")
                if (word.toLowerCase() in colorList) {
                    colorsUsed.add(word.toLowerCase())
                }
            }
        }
    }

    return colorsUsed
}
/**
 * Given a designer name and a list of design options, return a list of colors that the designer
 * has used in their designs.
 *
 * @param designerName The name of the fashion designer
 * @param designOptions A list of design options available
 * @return A list of colors used by the designer
 */
fun findColorsForDesigner(designerName: String, designOptions: List<String>): List<String> {
/**
 * Given a designer name and a list of design options, return a list of colors that the designer
 * has used in their designs.
 *
 * @param designerName The name of the fashion designer
 * @param designOptions A list of design options available
 * @return A list of colors used by the designer
 */
fun findColorsForDesigner(designerName: String, designOptions: List<String>): List<String> {

    val colorsUsed = mutableListOf<String>()

    for (design in designOptions) {
        if (designerName in design) {
            val words = design.split(" ")

            for (word in words) {
                val colorList = listOf("red", "blue", "green", "yellow", "purple", "orange")
                if (word.toLowerCase() in colorList) {
                    colorsUsed.add(word.toLowerCase())
                }
            }
        }
    }

    return colorsUsed
}