/**
 * Given two color palettes, create a new palette by copying the colors from both palettes.
 * The new palette should contain unique colors, without duplicates.
 * The color names should be in uppercase format.
 * Nested ternary operators should be used for color formatting.
 */
fun createColorPalette(palette1: List<String>, palette2: List<String>): List<String> {

    // Copying lists and applying nested ternary operators to format color names
    val newPalette = (palette1.map { if (it[0].isLowerCase()) it.toUpperCase() else it.capitalize() } +
                      palette2.map { if (it[0].isLowerCase()) it.toUpperCase() else it.capitalize() }).toSet()
    
    return newPalette.toList()
}
/**
 * Given two color palettes, create a new palette by copying the colors from both palettes.
 * The new palette should contain unique colors, without duplicates.
 * The color names should be in uppercase format.
 * Nested ternary operators should be used for color formatting.
 */
fun createColorPalette(palette1: List<String>, palette2: List<String>): List<String> {
/**
 * Given two color palettes, create a new palette by copying the colors from both palettes.
 * The new palette should contain unique colors, without duplicates.
 * The color names should be in uppercase format.
 * Nested ternary operators should be used for color formatting.
 */
fun createColorPalette(palette1: List<String>, palette2: List<String>): List<String> {

    // Copying lists and applying nested ternary operators to format color names
    val newPalette = (palette1.map { if (it[0].isLowerCase()) it.toUpperCase() else it.capitalize() } +
                      palette2.map { if (it[0].isLowerCase()) it.toUpperCase() else it.capitalize() }).toSet()
    
    return newPalette.toList()
}