|
@@ -81,7 +81,9 @@ const getColorButtonStyle = (hex) => {
|
|
targetColor.subscribe((hex, { previous }) => {
|
|
targetColor.subscribe((hex, { previous }) => {
|
|
const style = document.querySelector(":root").style;
|
|
const style = document.querySelector(":root").style;
|
|
style.setProperty("--background", hex);
|
|
style.setProperty("--background", hex);
|
|
- style.setProperty("--highlight", getContrastingTextColor(hex));
|
|
|
|
|
|
+ const highlight = getContrastingTextColor(hex);
|
|
|
|
+ style.setProperty("--highlight", highlight);
|
|
|
|
+ style.setProperty("--shadow-component", highlight.includes("light") ? "255" : "0");
|
|
|
|
|
|
if (previous) {
|
|
if (previous) {
|
|
const prevButton = document.createElement("button");
|
|
const prevButton = document.createElement("button");
|