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

# NSAppearance

An object that manages standard appearance attributes for UI elements in an app.

```
class NSAppearance
```

## Overview

An [`NSAppearance`](/documentation/AppKit/NSAppearance) object manages how AppKit renders your app’s UI elements. Specifically, appearance objects determine which colors and images AppKit uses when drawing windows, views, and controls. Although you can use an appearance object to determine how to draw custom views and controls, a better approach is to choose colors and images that adapt automatically to the current appearance. For example, define a color asset whose actual color value changes for light and dark appearances. You can assign specific appearances to your views in Interface Builder.

The user chooses the default appearance for the system, but you can override that appearance for all or part of your app. Apps inherit the default system appearance, windows inherit their app’s appearance, and views inherit the appearance of their nearest ancestor (either a superview or window). To force a window or view to adopt an appearance, assign a specific appearance object to its [`appearance`](/documentation/AppKit/NSAppearanceCustomization/appearance) property.

When AppKit draws a control, it automatically sets the current appearance on the current thread to the control’s appearance. The current appearance influences the drawing path and return values you get when you access system fonts and colors. The current appearance also affects the appearance of text and images, such as the text and template images in a toolbar.

## Topics

### Creating an Appearance

[`init(named:)`](/documentation/AppKit/NSAppearance/init(named:))

Creates an appearance object based on the name of one of the standard system appearances.

[`init(appearanceNamed:bundle:)`](/documentation/AppKit/NSAppearance/init(appearanceNamed:bundle:))

Creates an appearance object from the named appearance file located in the specified bundle.

[`init(coder:)`](/documentation/AppKit/NSAppearance/init(coder:))

### Getting the Appearance Name

[`name`](/documentation/AppKit/NSAppearance/name-swift.property)

The name of the appearance.

[`NSAppearance.Name`](/documentation/AppKit/NSAppearance/Name-swift.struct)

### Determining the Most Appropriate Appearance

[`bestMatch(from:)`](/documentation/AppKit/NSAppearance/bestMatch(from:))

Returns the appearance name that most closely matches the current appearance object.

### Getting and Setting the Current Appearance

[`currentDrawing()`](/documentation/AppKit/NSAppearance/currentDrawing())

The appearance that the system uses for color and asset resolution, and that’s active for drawing, usually from locking focus on a view.

[`currentDrawingAppearance`](/documentation/AppKit/NSAppearance/currentDrawingAppearance)

The appearance that the system uses for color and asset resolution, and that’s active for drawing, usually from locking focus on a view.

[`performAsCurrentDrawingAppearance(_:)`](/documentation/AppKit/NSAppearance/performAsCurrentDrawingAppearance(_:))

Sets the appearance to be the active drawing appearance and perform the specified block.

[`current`](/documentation/AppKit/NSAppearance/current)

Returns the appearance object that’s active on the current thread.

### Managing Vibrancy

[`allowsVibrancy`](/documentation/AppKit/NSAppearance/allowsVibrancy)

Specifies whether the current appearance allows vibrancy.



---

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)