Skip to content

Commit

Permalink
rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
karsonkalt committed Sep 27, 2024
1 parent 56e4821 commit da44771
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions assets/ts/home/updateAccentColor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
import chroma from "chroma-js";

// let currentHue = 0;
// const HUE_INCREMENT = 1; // Adjust this value to control the speed of the transition
// const UPDATE_INTERVAL = 250; // Update interval in milliseconds

// const startRainbowTransition = (inputColor: string) => {
// setInterval(() => {
// currentHue = (currentHue + HUE_INCREMENT) % 360;
// const colorWithNewHue = chroma(inputColor).set("hsl.h", currentHue).hex();
// updateAccentColor(colorWithNewHue);
// }, UPDATE_INTERVAL);
// };

// startRainbowTransition("#ff0000");

export const updateAccentColor = (inputColor: string): boolean => {
try {
if (!isValidColor(inputColor)) {
Expand Down

0 comments on commit da44771

Please sign in to comment.