An object that represents a particular system appearance along with the system color values at a particular time.
A VAppearance object is immutable.
Methods
Modifier and Type
Method and Description
getColors
abstract Map<String,Color> getColors()
Return a non-modifiable map that provides the values of known system colors.
Map<String,Color> getColors()
Return a non-modifiable map that provides the values of known system colors.
getName
abstract String getName()
Return the system name of the appearance.
String getName()
Return the system name of the appearance. Currently, four names are possible in macOS:
NSAppearanceNameAqua – the original, light Aqua appearance, standard in macOS 10.10–10.13.
NSAppearanceNameDarkAqua – the dark system appearance introduced in macOS 10.14.
NSAppearanceNameVibrantLight – a light vibrant appearance, used in specific situations.
NSAppearanceNameVibrantDark – a dark vibrant appearance, used in specific situations.
Note that there can be many VAppearance objects with the same name, but at any one time, there is one
that represents the current state of the system as it pertains to appearance and system colors. The relevant
system state includes the selected system appearance, the accent color, the highlight color, and the increased
contrast accessibility option.
Returns:
the appearance name.
isDark
abstract boolean isDark()
Identify a dark system appearance.
boolean isDark()
Identify a dark system appearance.
Returns:
true if and only if this appearance is a dark appearance.
isHighContrast
abstract boolean isHighContrast()
Identify a high contrast system appearance.
boolean isHighContrast()
Identify a high contrast system appearance. A high contrast system appearance indicates that the user has enabled
the accessibility option to increase contrast in the UI.
Returns:
true if and only if this appearance is a high contrast appearance.