Streak Square Brightness Logic
Nucleic-Session: 129BD35A-FB15-4E39-82E2-F476950F60AD Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -44,6 +44,13 @@ enum Palette {
|
|||||||
default: success
|
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).
|
/// Status glyph + label, matching the Mac semantics (UX_MACOS §1).
|
||||||
|
|||||||
Reference in New Issue
Block a user