<!--
{
  "availability" : [
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PencilKit",
  "identifier" : "/documentation/PencilKit/PKInkingToolReference/invertColor(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "PencilKit"
    ],
    "preciseIdentifier" : "c:objc(cs)PKInkingTool(cm)invertColor:"
  },
  "title" : "invertColor(_:)"
}
-->

# invertColor(_:)

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

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

## Parameters

`color`

The color to be inverted light<->dark.

## Return Value

The inverted color.

## Discussion

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

---

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)