mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 21:32:18 +00:00
Colour insight series from the chart palette, not the status tokens
Metric pages coloured their series with success, info, warning, destructive or a raw palette yellow, picked per page, so a steps line read as 'good' and a resting-pulse line as an alarm. Series now take the chart tokens by hue family (chart-2 green, chart-3 pink, chart-4 cyan, chart-5 orange), and the systolic/diastolic pair and the pulse pair stay paired. Status colours remain where they carry meaning: target bands, time in range, mood score scales. The mood tag scale drops its raw palette reds and greens for the status tokens, which are tuned for the light theme.
This commit is contained in:
1 parent
a1b46eb2f4
commit
e9a5614733
37 files changed
+50
-50
No files matched your search
@@ -28,10 +28,10 @@ export interface MoodStructuredTagRow {
|
||||
}
|
||||
|
||||
function colorForScore(score: number): string {
|
||||
if (score < 2) return "var(--dracula-red)";
|
||||
if (score < 3) return "var(--dracula-orange)";
|
||||
if (score < 2) return "var(--destructive)";
|
||||
if (score < 3) return "var(--warning)";
|
||||
if (score < 3.5) return "var(--dracula-yellow)";
|
||||
return "var(--dracula-green)";
|
||||
return "var(--success)";
|
||||
}
|
||||
|
||||
export function MoodStructuredTagBreakdown({
|
||||
|
||||
@@ -89,7 +89,7 @@ export function RecoverySection() {
|
||||
title: t("measurements.typeAnsCharge"),
|
||||
explainer: t("insights.recovery.block.ansChargeExplainer"),
|
||||
icon: Battery,
|
||||
color: "var(--success)",
|
||||
color: "var(--chart-2)",
|
||||
unit: unitScore,
|
||||
fractionDigits: 1,
|
||||
},
|
||||
@@ -105,7 +105,7 @@ export function RecoverySection() {
|
||||
title: t("measurements.typeDayStrain"),
|
||||
explainer: t("insights.recovery.block.dayStrainExplainer"),
|
||||
icon: Gauge,
|
||||
color: "var(--warning)",
|
||||
color: "var(--chart-5)",
|
||||
unit: unitScore,
|
||||
fractionDigits: 1,
|
||||
},
|
||||
@@ -142,7 +142,7 @@ export function RecoverySection() {
|
||||
title: t("measurements.typeAverageHeartRate"),
|
||||
explainer: t("insights.recovery.block.averageHeartRateExplainer"),
|
||||
icon: Heart,
|
||||
color: "var(--info)",
|
||||
color: "var(--chart-4)",
|
||||
unit: unitBpm,
|
||||
},
|
||||
{
|
||||
@@ -152,7 +152,7 @@ export function RecoverySection() {
|
||||
title: t("measurements.typeMaxHeartRate"),
|
||||
explainer: t("insights.recovery.block.maxHeartRateExplainer"),
|
||||
icon: HeartPulse,
|
||||
color: "var(--destructive)",
|
||||
color: "var(--chart-3)",
|
||||
unit: unitBpm,
|
||||
},
|
||||
{
|
||||
@@ -162,7 +162,7 @@ export function RecoverySection() {
|
||||
title: t("measurements.typeEnergyExpenditureKj"),
|
||||
explainer: t("insights.recovery.block.energyExpenditureKjExplainer"),
|
||||
icon: Flame,
|
||||
color: "var(--dracula-yellow)",
|
||||
color: "var(--chart-5)",
|
||||
unit: unitKj,
|
||||
},
|
||||
],
|
||||
|
||||
@@ -42,7 +42,7 @@ export function SleepDurationChart({
|
||||
chartKey="sleep"
|
||||
types={["SLEEP_DURATION"]}
|
||||
title={t("charts.sleep")}
|
||||
colors={["var(--info)"]}
|
||||
colors={["var(--chart-4)"]}
|
||||
unit="h"
|
||||
yAxisUnit="h"
|
||||
compareBaseline={compareBaseline}
|
||||
|
||||
@@ -64,28 +64,28 @@ export function SleepQualitySection({ enabled }: { enabled: boolean }) {
|
||||
type: "SLEEP_PERFORMANCE",
|
||||
title: t("measurements.typeSleepPerformance"),
|
||||
icon: Target,
|
||||
color: "var(--info)",
|
||||
color: "var(--chart-4)",
|
||||
unit: "%",
|
||||
},
|
||||
{
|
||||
type: "SLEEP_EFFICIENCY",
|
||||
title: t("measurements.typeSleepEfficiency"),
|
||||
icon: Gauge,
|
||||
color: "var(--success)",
|
||||
color: "var(--chart-2)",
|
||||
unit: "%",
|
||||
},
|
||||
{
|
||||
type: "SLEEP_CONSISTENCY",
|
||||
title: t("measurements.typeSleepConsistency"),
|
||||
icon: Repeat,
|
||||
color: "var(--dracula-yellow)",
|
||||
color: "var(--chart-5)",
|
||||
unit: "%",
|
||||
},
|
||||
{
|
||||
type: "SLEEP_NEED",
|
||||
title: t("measurements.typeSleepNeed"),
|
||||
icon: Waves,
|
||||
color: "var(--warning)",
|
||||
color: "var(--chart-5)",
|
||||
unit: t("insights.deviceScore.unitMinutes"),
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user