<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSGraphicsContext/attributes",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSGraphicsContext(py)attributes"
  },
  "title" : "attributes"
}
-->

# attributes

The attributes used to create this instance.

```
var attributes: [NSGraphicsContext.AttributeKey : Any]? { get }
```

## Discussion

Screen-based graphics contexts do not store attributes, even if you create them using [`init(attributes:)`](/documentation/AppKit/NSGraphicsContext/init(attributes:)).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)