---
title: hasColors
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uipasteboard/hascolors
---

# hasColors

A Boolean value that indicates whether the pasteboard contains contains a nonempty array of colors.

## Declaration

```swift
var hasColors: Bool { get }
```

## Discussion

Discussion Employ this property to determine if a pasteboard contains color data. Do not use the color or colors properties to determine whether a pasteboard contains color data, because doing so consumes resources needlessly.

## See Also

### Checking for data types on a pasteboard

- [hasImages](uikit/uipasteboard/hasimages.md)
- [hasStrings](uikit/uipasteboard/hasstrings.md)
- [hasURLs](uikit/uipasteboard/hasurls.md)
