From 368c649f891fe6b70c08ab5801341650a848a6a5 Mon Sep 17 00:00:00 2001 From: Ari Archer Date: Wed, 17 Aug 2022 01:16:32 +0300 Subject: [PATCH] Improve how the colouring is showed in html (ttytheme) Signed-off-by: Ari Archer --- content/js/ttytheme/menu.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/content/js/ttytheme/menu.js b/content/js/ttytheme/menu.js index 7bcb9ef..afd8d74 100644 --- a/content/js/ttytheme/menu.js +++ b/content/js/ttytheme/menu.js @@ -53,7 +53,10 @@ export function generate_theme(query = "#theme-output") { document.body.style.backgroundColor = `rgb(${tty_clrs["black"].rgb.join( "," )})`; - document.body.style.color = `rgb(${tty_clrs["bold_white"].rgb.join(",")})`; + document.body.style.color = `rgb(${tty_clrs["light_gray"].rgb.join(",")})`; + + for (let header of document.querySelectorAll("h1, h2:first-of-type")) + header.style.color = `rgb(${tty_clrs["bold_white"].rgb.join(",")})`; let elem = document.querySelector(query); if (!elem) throw ReferenceError(`${query} did not match any results`);