diff --git a/NucleicRemote/NucleicRemote/Views/Theme.swift b/NucleicRemote/NucleicRemote/Views/Theme.swift index 0efe699..d0af6c2 100644 --- a/NucleicRemote/NucleicRemote/Views/Theme.swift +++ b/NucleicRemote/NucleicRemote/Views/Theme.swift @@ -44,6 +44,13 @@ enum Palette { default: success } } + + /// Activity-grid shade for a continuous brightness in `0…1` (relative to the user's own + /// activity, outliers excluded — see `ActivityScale`). `0` is an empty day's neutral gray. + /// Mirrors the Mac's `AppPalette.activity(intensity:)`. + static func activity(intensity: Double) -> Color { + intensity <= 0 ? Color.secondary.opacity(0.15) : success.opacity(intensity) + } } /// Status glyph + label, matching the Mac semantics (UX_MACOS §1).