---
title: shouldDrawColor()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nsview/shoulddrawcolor()
---

# shouldDrawColor()

Returns a Boolean value indicating whether the view is being drawn to an environment that supports color.

## Declaration

```swift
func shouldDrawColor() -> Bool
```

## Return Value

Return Value true if the view’s window supports color drawing or false if it does not.

## Discussion

Discussion A view object can base its drawing behavior on the return value of this method to improve its appearance in grayscale windows. This method might return false when the view’s window does not store color information because the content is destined for a grayscale printer.

## See Also

### Related Documentation

- [draw(_:)](appkit/nsview/draw(_:).md)
- [canStoreColor()](appkit/nswindow/canstorecolor().md)

### Methods

- [lockFocus()](appkit/nsview/lockfocus().md)
- [lockFocusIfCanDraw()](appkit/nsview/lockfocusifcandraw().md)
- [lockFocusIfCanDraw(in:)](appkit/nsview/lockfocusifcandraw(in:).md)
- [unlockFocus()](appkit/nsview/unlockfocus().md)
- [scroll(_:by:)](appkit/nsview/scroll(_:by:).md)
- [allocateGState()](appkit/nsview/allocategstate().md)
- [gState()](appkit/nsview/gstate().md)
- [setUpGState()](appkit/nsview/setupgstate().md)
- [renewGState()](appkit/nsview/renewgstate().md)
- [releaseGState()](appkit/nsview/releasegstate().md)
- [dragFile(_:from:slideBack:event:)](appkit/nsview/dragfile(_:from:slideback:event:).md)
- [dragPromisedFiles(ofTypes:from:source:slideBack:event:)](appkit/nsview/dragpromisedfiles(oftypes:from:source:slideback:event:).md)
