---
title: "MACaptionAppearanceCopyWindowColor(_:_:)"
framework: mediaaccessibility
role: symbol
role_heading: Function
path: "mediaaccessibility/macaptionappearancecopywindowcolor(_:_:)"
---

# MACaptionAppearanceCopyWindowColor(_:_:)

Returns the preference for the caption window’s color.

## Declaration

```swift
func MACaptionAppearanceCopyWindowColor(_ domain: MACaptionAppearanceDomain, _ behavior: UnsafeMutablePointer<MACaptionAppearanceBehavior>?) -> Unmanaged<CGColor>
```

## Parameters

- `domain`: The domain to retrieve the preference value from. See doc://com.apple.mediaaccessibility/documentation/MediaAccessibility/MACaptionAppearanceDomain. Pass doc://com.apple.mediaaccessibility/documentation/MediaAccessibility/MACaptionAppearanceDomain/user unless the system defaults are needed for comparison.
- `behavior`: A pointer to memory. On return, this memory holds the caption appearance behavior for this preference setting. For possible values see doc://com.apple.mediaaccessibility/documentation/MediaAccessibility/MACaptionAppearanceBehavior. Pass NULL when you do not need the behavior setting.

## Return Value

Return Value The preferred color displayed behind all other caption elements.

## See Also

### Caption window settings

- [MACaptionAppearanceGetWindowOpacity(_:_:)](mediaaccessibility/macaptionappearancegetwindowopacity(_:_:).md)
- [MACaptionAppearanceGetWindowRoundedCornerRadius(_:_:)](mediaaccessibility/macaptionappearancegetwindowroundedcornerradius(_:_:).md)
