Streak Square Brightness Logic

Nucleic-Session: 129BD35A-FB15-4E39-82E2-F476950F60AD
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-06-27 15:45:53 -07:00
co-authored by Nucleic
parent b9dc784bf1
commit 6b770b56b1
@@ -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).