DroppyIconStyle
One of the six ways macOS 26 and later draws an app icon, plus the tint.
struct DroppyIconStyle
Read the user's current choice from shared, which updates live when it changes in System Settings ▸ Appearance, or from @Environment(\.droppyIconStyle) inside a surface the host draws. On macOS 14 and 15, which have no icon style, it is always default in the interface's light or dark.
Cases
DroppyIconStyle.Appearance.light
case light
DroppyIconStyle.Appearance.dark
case dark
DroppyIconStyle.Variant.default
case `default`
Full colour, the icon as designed.
DroppyIconStyle.Variant.clear
case clear
Frosted glass, no hue: hierarchy from luminance and opacity.
DroppyIconStyle.Variant.tinted
case tinted
The clear treatment washed in tint.
Initializers
init(_:)
init?(_ color: NSColor)
The colour's sRGB components, or nil for a pattern or catalog colour that has none.
init(appearance:variant:tint:)
init(appearance: Appearance, variant: Variant, tint: Tint? = nil)
init(rawValue:)
init?(rawValue: String)
init(rawValue:)
init?(rawValue: String)
init(red:green:blue:)
init(red: Double, green: Double, blue: Double)
Type properties
customTintColor
static let customTintColor: String
dark
static let dark: DroppyIconStyle
Default dark.
fallbackTint
static let fallbackTint: DroppyIconStyle.Tint
The tint used when the system offers none: the blue of the Automatic swatch in System Settings.
interfaceStyle
static let interfaceStyle: String
light
static let light: DroppyIconStyle
Default light: what every icon looked like before macOS 26.
theme
static let theme: String
tintColor
static let tintColor: String
Properties
appearance
var appearance: Appearance
blue
var blue: Double
cacheKey
var cacheKey: String { get }
A key that differs for every distinct picture, tint included.
description
var description: String { get }
description
var description: String { get }
green
var green: Double
hexString
var hexString: String { get }
Quantised to 8 bits a channel, so two reads of the same system colour through different colour spaces do not count as a change.
nsColor
var nsColor: NSColor { get }
red
var red: Double
renditionName
var renditionName: String { get }
The rendition's file-safe name: default, dark, clear-light, clear-dark, tinted-light or tinted-dark.
tint
var tint: Tint?
The tint colour. Only tinted uses it; it is nil for the other variants so they compare equal whatever the tint setting is.
variant
var variant: Variant
Type methods
allRenditions(tint:)
static func allRenditions(tint: Tint = fallbackTint) -> [DroppyIconStyle]
All six renditions, tinted ones in tint. Useful for a preview grid.
readCurrent()
static func readCurrent() -> DroppyIconStyle
The user's style right now, read from the global defaults.
Cheap: three defaults reads, plus the tint lookup when the style is tinted. On macOS 14 and 15 it is always Default.
resolve(themeName:interfaceIsDark:tint:)
static func resolve(themeName: String?, interfaceIsDark: Bool, tint: Tint?) -> DroppyIconStyle
The style a theme string names. nil or empty is Default, and the …Automatic themes follow interfaceIsDark, as do unknown ones.
Methods
hash(into:)
func hash(into hasher: inout Hasher)
Operators
==(_:_:)
static func == (lhs: Tint, rhs: Tint) -> Bool