---
title: "callAsFunction(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiconfigurationcolortransformer-swift.struct/callasfunction(_:)"
---

# callAsFunction(_:)

Calls the transform closure of the color transformer.

## Declaration

```swift
func callAsFunction(_ input: UIColor) -> UIColor
```

## Discussion

Discussion Using this syntax, you can call the color transformer type as if it were a closure: let alphaColorTransformer = UIConfigurationColorTransformer() { baseColor -> UIColor in     return baseColor.withAlphaComponent(0.5) }

let baseColor = UIColor.red let modifiedColor = alphaColorTransformer(baseColor)

## See Also

### Calling the color transformer

- [transform](uikit/uiconfigurationcolortransformer-swift.struct/transform.md)
