From 672e057f83fb0ac57dcd21440f891d863e02cb12 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= <userquin@gmail.com>
Date: Sat, 30 Nov 2024 15:42:17 +0100
Subject: [PATCH] docs: add primary light theme to fix color contrast (#3070)

---
 docs/tokens.config.ts | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/docs/tokens.config.ts b/docs/tokens.config.ts
index c27ee13f..0d549f95 100644
--- a/docs/tokens.config.ts
+++ b/docs/tokens.config.ts
@@ -1,8 +1,17 @@
 import { defineTheme } from 'pinceau'
 import { getColors } from 'theme-colors'
 
+const light = getColors('#995e1b')
+const primary = Object
+  .entries(getColors('#d98018'))
+  .reduce((acc, [key, value]) => {
+    acc[key] = {
+      initial: light[key]!,
+      dark: value,
+    }
+    return acc
+  }, {} as Record<string | number, { initial: string, dark: string }>)
+
 export default defineTheme({
-  color: {
-    primary: getColors('#d98018'),
-  },
+  color: { primary },
 })