---
title: "changeColor(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextview/changecolor(_:)"
---

# changeColor(_:)

Sets the color of the selected text.

## Declaration

```swift
func changeColor(_ sender: Any?)
```

## Parameters

- `sender`: The control that sent the message. NSTextView’s implementation sends a doc://com.apple.appkit/documentation/AppKit/NSColorPanel/color message to sender to get the new color.

## See Also

### Setting text attributes

- [alignJustified(_:)](appkit/nstextview/alignjustified(_:).md)
- [changeAttributes(_:)](appkit/nstextview/changeattributes(_:).md)
- [setAlignment(_:range:)](appkit/nstextview/setalignment(_:range:).md)
- [typingAttributes](appkit/nstextview/typingattributes.md)
- [useStandardKerning(_:)](appkit/nstextview/usestandardkerning(_:).md)
- [lowerBaseline(_:)](appkit/nstextview/lowerbaseline(_:).md)
- [raiseBaseline(_:)](appkit/nstextview/raisebaseline(_:).md)
- [turnOffKerning(_:)](appkit/nstextview/turnoffkerning(_:).md)
- [loosenKerning(_:)](appkit/nstextview/loosenkerning(_:).md)
- [tightenKerning(_:)](appkit/nstextview/tightenkerning(_:).md)
- [useStandardLigatures(_:)](appkit/nstextview/usestandardligatures(_:).md)
- [turnOffLigatures(_:)](appkit/nstextview/turnoffligatures(_:).md)
- [useAllLigatures(_:)](appkit/nstextview/useallligatures(_:).md)
- [toggleTraditionalCharacterShape(_:)](appkit/nstextview/toggletraditionalcharactershape(_:).md)
