<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "tvOS: 14.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIConfigurationColorTransformer-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:5UIKit31UIConfigurationColorTransformerV"
  },
  "title" : "UIConfigurationColorTransformer"
}
-->

# UIConfigurationColorTransformer

A transformer that generates a modified output color from an input color.

```
struct UIConfigurationColorTransformer
```

## Overview

A color transformer takes an input color and modifies it to produce a different output color. For example, you might have a color transformer that returns a grayscale or reduced alpha version of the input color.

Because color transformers can use the same base input color to produce a number of variants of that color, you can create different appearances for different states of your views.

## Topics

### Creating a color transformer

[`init((UIColor) -> UIColor)`](/documentation/UIKit/UIConfigurationColorTransformer-swift.struct/init(_:))

Creates a color transformer with the specified closure.

[`static let grayscale: UIConfigurationColorTransformer`](/documentation/UIKit/UIConfigurationColorTransformer-swift.struct/grayscale)

Creates a color transformer that generates a grayscale version of the color.

[`static let preferredTint: UIConfigurationColorTransformer`](/documentation/UIKit/UIConfigurationColorTransformer-swift.struct/preferredTint)

A color transformer that returns the preferred system accent color.

[`static let monochromeTint: UIConfigurationColorTransformer`](/documentation/UIKit/UIConfigurationColorTransformer-swift.struct/monochromeTint)

A color transformer that returns the color with a monochrome tint.

### Calling the color transformer

[`let transform: (UIColor) -> UIColor`](/documentation/UIKit/UIConfigurationColorTransformer-swift.struct/transform)

The transform closure of the color transformer.

[`func callAsFunction(UIColor) -> UIColor`](/documentation/UIKit/UIConfigurationColorTransformer-swift.struct/callAsFunction(_:))

Calls the transform closure of the color transformer.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)