---
title: "takeColorFrom(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscolorwell/takecolorfrom(_:)"
---

# takeColorFrom(_:)

Changes the currently selected color to the color of the specified object.

## Declaration

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

## Parameters

- `sender`: The object from which to take the new color.

## Discussion

Discussion This method attempts to access a property or accessor method named color. If the object doesn’t implement a color accessor, this method does nothing.

## See Also

### Managing the selected color

- [color](appkit/nscolorwell/color.md)
- [supportsAlpha](appkit/nscolorwell/supportsalpha.md)
