feat: Hintergrund wechselt dynamisch zur Pastelversion der aktuellen Farbe
Bei jeder Farbidentifikation wird der Hue übernommen, Sättigung gedämpft (max 45%) und Helligkeit auf 92% gesetzt. Sanfter 0.8s CSS-Übergang. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,13 @@ document.querySelectorAll('.tab-btn').forEach(btn => {
|
|||||||
// Every color change goes into history
|
// Every color change goes into history
|
||||||
document.addEventListener('colorChanged', (e) => addToHistory(e.detail));
|
document.addEventListener('colorChanged', (e) => addToHistory(e.detail));
|
||||||
|
|
||||||
|
// Hintergrundfarbe als extrem helles Pastell der aktuellen Farbe
|
||||||
|
document.addEventListener('colorChanged', (e) => {
|
||||||
|
const { h, s } = e.detail;
|
||||||
|
const pastelS = Math.round(Math.min(s * 0.5, 45));
|
||||||
|
document.body.style.background = `hsl(${h}, ${pastelS}%, 92%)`;
|
||||||
|
});
|
||||||
|
|
||||||
initEingabe(addFavorit, addColorToSchema);
|
initEingabe(addFavorit, addColorToSchema);
|
||||||
initPicker(addFavorit, addColorToSchema);
|
initPicker(addFavorit, addColorToSchema);
|
||||||
initHarmonien(addFavorit, addColorToSchema);
|
initHarmonien(addFavorit, addColorToSchema);
|
||||||
|
|||||||
Reference in New Issue
Block a user