diff --git a/src/tailwindui/AppShell.svelte b/src/tailwindui/AppShell.svelte index 35d46f9..2d6f7aa 100644 --- a/src/tailwindui/AppShell.svelte +++ b/src/tailwindui/AppShell.svelte @@ -5,6 +5,21 @@ export let showNotificationBell = false; export let showProfileMenu = false; + const randint = (min, max) => min + Math.round(Math.random() * (max - min)) + + function themeRandomize(){ + var hue = randint(0,360) + var saturation = randint(0,100) + var lightness = randint(0,100) + + let primary = `hsl(${hue}, ${saturation}%, ${lightness}%)`; + let opposite = `hsl(${(hue + 180) % 360}, ${saturation}%, ${100-lightness}%)`; + tailwind.config.theme.extend.colors.lightTertiary = primary; + tailwind.config.theme.extend.colors.lightBg = opposite; + console.log({primary}); + console.log({opposite}); + } +
@@ -82,6 +97,7 @@