---
title: "hasDifferentColorAppearance(comparedTo:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitraitcollection/hasdifferentcolorappearance(comparedto:)"
---

# hasDifferentColorAppearance(comparedTo:)

Queries whether changing between the specified and current trait collections would affect color values.

## Declaration

```swift
func hasDifferentColorAppearance(comparedTo traitCollection: UITraitCollection?) -> Bool
```

## Parameters

- `traitCollection`: A trait collection that you want to compare to the current trait collection.

## Return Value

Return Value true if the colors in the two trait collections differ, or false if they have the same component values.

## Discussion

Discussion Use this method to determine whether changing the traits of the current environment would also change the colors in your interface. For example, changing the userInterfaceStyle or accessibilityContrast property usually changes the colors of your interface.

## See Also

### Comparing trait collections

- [containsTraits(in:)](uikit/uitraitcollection/containstraits(in:).md)
