---
title: "invertColor(_:)"
framework: pencilkit
role: symbol
role_heading: Type Method
path: "pencilkit/pkinkingtoolreference/invertcolor(_:)"
---

# invertColor(_:)

Converts a color from light to dark appearance or vice versa.

## Declaration

```swift
class func invertColor(_ color: CGColor) -> Unmanaged<CGColor>
```

## Parameters

- `color`: The color to be inverted light<->dark.

## Return Value

Return Value The inverted color.

## Discussion

Discussion This has the same effect as convertColor with opposite user interface styles.
