---
title: bitsPerPixel
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nswindow/depth/bitsperpixel
---

# bitsPerPixel

Returns the bits per pixel for the specified window depth.

## Declaration

```swift
var bitsPerPixel: Int { get }
```

## Discussion

Discussion Returns the number of bits per pixel for the window depth specified by depth.

## See Also

### Working with Window Depths

- [bitsPerSample](appkit/nswindow/depth/bitspersample.md)
- [colorSpaceName](appkit/nswindow/depth/colorspacename.md)
- [numberOfColorComponents](appkit/nscolorspacename/numberofcolorcomponents.md)
- [isPlanar](appkit/nswindow/depth/isplanar.md)
- [canRepresent(_:)](appkit/nswindow/canrepresent(_:).md)
