From 4938b45ef63f128bbb13d4b5f183bdb3c60ad6d8 Mon Sep 17 00:00:00 2001 From: nando-bingani Date: Wed, 7 Oct 2026 10:57:29 +0200 Subject: [PATCH] Tint the type badge in the type's colour instead of showing a dot The project type badge now matches the other coloured badges, such as the project count: the whole box is a light tint of the type's colour, with the text in a darker shade of the same hue. The dot is gone. The text shades read at 4.9:1 or better on their tint; the identity colours themselves only reach about 3:1. Map and chart legends keep their dots. --- src/components/InterventionBadge.jsx | 12 ++++++------ src/utils/typeColors.js | 20 ++++++++++++++++++++ src/utils/typeColors.test.js | 9 +++++++++ 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/components/InterventionBadge.jsx b/src/components/InterventionBadge.jsx index 253bd14..304036f 100644 --- a/src/components/InterventionBadge.jsx +++ b/src/components/InterventionBadge.jsx @@ -1,13 +1,13 @@ // ───────────────────────────────────────────────────────────────────────────── -// InterventionBadge — project type in the shared boxed .badge style, with a -// colour dot carrying the type colour (shared with the map and charts, -// utils/typeColors.js); the text keeps the badge's readable colour. +// InterventionBadge — project type in the shared boxed .badge style, the box +// tinted in the type's colour (shared with the map and charts, +// utils/typeColors.js) behind darker text of the same hue, like the other +// coloured badges. // ───────────────────────────────────────────────────────────────────────────── -import { typeColor } from '../utils/typeColors'; +import { typeTextColor, typeTint } from '../utils/typeColors'; const InterventionBadge = ({ type }) => ( - -