diff options
Diffstat (limited to 'js')
| -rw-r--r-- | js/background-sparkles.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/background-sparkles.js b/js/background-sparkles.js index 50f073c..caac762 100644 --- a/js/background-sparkles.js +++ b/js/background-sparkles.js @@ -6,6 +6,8 @@ // SCRIPT #1 // /////////////// +// If light mode detected, in reality, if nothing is detected lmao +// Dark mode feature was removed lol // Set up base pattern var pattern = Trianglify({ height: window.innerHeight, // White: #fdfbfb, Salmon: #cc3300 @@ -17,6 +19,20 @@ var pattern = Trianglify({ cell_size: 160 // Cell size }); +// REMOVED bc looked ugly +// If dark mode detected +// if (matchMedia('(prefers-color-scheme: dark)').matches) { +// var pattern = Trianglify({ +// height: window.innerHeight, // White: #fdfbfb, Salmon: #cc3300 +// width: window.innerWidth, +// x_colors: ['#040404', '#111111', '#111111', '#111111', '#d55454'], // Cappuccino: ['#854442', '#3c2f2f', '#fff4e6', '#be9b7b', '#4b3832'] +// y_colors: ['#f9f1f1', '#111111', '#111111', '#111111', '#f9f1f1'], // Random colour generator: "#"+((1<<24)*Math.random()|0).toString(16) +// variance: 10, // Gives it more style +// seed: Number.parseInt(Math.floor(Math.random() * 100)), // TODO: Live seed transitioning. +// cell_size: 160 // Cell size +// }); +// } + // // Canvas // document.body.appendChild(pattern.canvas()) |