From 63d10c8b5a41fe45a72c8ea141977fb797228f1f Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Wed, 7 Oct 2026 11:56:13 +0200 Subject: [PATCH] Add full color palette table to debug panel --- index.html | 64 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 17 deletions(-) diff --git a/index.html b/index.html index 86ea4b1..6348ced 100644 --- a/index.html +++ b/index.html @@ -269,6 +269,7 @@
bgColor
--
Theme table
+
@@ -422,24 +423,35 @@ var effect = (VANTA.CLOUDS2 || VANTA.CLOUDS)({ // Read color palette from CSS variables function getColors() { var root = getComputedStyle(document.documentElement); - return { - void: root.getPropertyValue('--black').trim(), - panel: root.getPropertyValue('--dark').trim(), - raised: root.getPropertyValue('--gray-darker').trim(), - border: root.getPropertyValue('--gray-dark').trim(), - mid: root.getPropertyValue('--gray').trim(), - ash: root.getPropertyValue('--gray-light').trim(), - stone: root.getPropertyValue('--stone').trim(), - icon: root.getPropertyValue('--icon').trim(), - bone: root.getPropertyValue('--bone').trim(), - chalk: root.getPropertyValue('--chalk').trim(), - ember: root.getPropertyValue('--orange').trim(), - gold: root.getPropertyValue('--yellow').trim(), - blood: root.getPropertyValue('--red').trim(), - rust: root.getPropertyValue('--brown').trim(), - steel: root.getPropertyValue('--blue').trim(), - steelLight: root.getPropertyValue('--blue-light').trim() + var keys = [ + 'void', 'panel', 'raised', 'border', 'mid', 'ash', + 'icon', 'stone', 'bone', 'chalk', + 'ember', 'gold', 'blood', 'rust', 'rot', 'moss', 'steel', 'steelLight', 'violet' + ]; + var map = { + void: 'black', + panel: 'dark', + raised: 'gray-darker', + border: 'gray-dark', + mid: 'gray', + ash: 'gray-light', + ember: 'orange', + gold: 'yellow', + blood: 'red', + rust: 'brown', + rot: 'pink', + moss: 'green', + steel: 'blue', + steelLight: 'blue-light', + violet: 'purple' }; + var result = {}; + for (var i = 0; i < keys.length; i++) { + var ashKey = keys[i]; + var cssKey = map[ashKey] || ashKey; + result[ashKey] = root.getPropertyValue('--' + cssKey).trim(); + } + return result; } function hexToInt(hex) { @@ -1138,6 +1150,24 @@ var weatherThemes = { tableHtml += '
'; } document.getElementById('dbg-theme-table').innerHTML = tableHtml; + + // Color palette table - all colors from the palette + var colorKeys = [ + 'black', 'dark', 'gray-darker', 'gray-dark', 'gray', 'gray-light', + 'icon', 'stone', 'bone', 'chalk', + 'orange', 'yellow', 'red', 'brown', 'pink', 'green', 'blue', 'blue-light', 'purple' + ]; + var colorHtml = '
Palette
'; + for (var k = 0; k < colorKeys.length; k++) { + var ck = colorKeys[k]; + var cv = ASH[ck] || root.getPropertyValue('--' + ck).trim(); + colorHtml += '
' + + '' + ck + '' + + '
' + + '' + cv + '' + + '
'; + } + document.getElementById('dbg-color-table').innerHTML = colorHtml; } function animate() {