File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 132132 height: 24px;
133133 border-radius: 6px;
134134 border: 2px solid rgba(255, 255, 255, 0.3);
135- background: #508C72 ;
135+ background: hsl(154, 35%, 65%) ;
136136 flex-shrink: 0;
137137 }
138138
144144 border-radius: 4px;
145145 outline: none;
146146 background: linear-gradient(to right,
147- hsl(0, 27 %, 43 %),
148- hsl(60, 27 %, 43 %),
149- hsl(120, 27 %, 43 %),
150- hsl(180, 27 %, 43 %),
151- hsl(240, 27 %, 43 %),
152- hsl(300, 27 %, 43 %),
153- hsl(360, 27 %, 43 %)
147+ hsl(0, 35 %, 65 %),
148+ hsl(60, 35 %, 65 %),
149+ hsl(120, 35 %, 65 %),
150+ hsl(180, 35 %, 65 %),
151+ hsl(240, 35 %, 65 %),
152+ hsl(300, 35 %, 65 %),
153+ hsl(360, 35 %, 65 %)
154154 );
155155 }
156156
240240 // Base hue of #508C72 is ~154°
241241 const BASE_HUE = 154;
242242
243+ // Apply pastel filter on load
244+ container.style.filter = "saturate(0.8) brightness(1.15)";
245+
243246 range.addEventListener("input", () => {
244247 const val = parseInt(range.value);
245- container.style.filter = val === 0 ? "" : `hue-rotate(${val}deg)`;
248+ container.style.filter = val === 0
249+ ? "saturate(0.8) brightness(1.15)"
250+ : `hue-rotate(${val}deg) saturate(0.8) brightness(1.15)`;
246251 degrees.textContent = `${val}°`;
247252
248253 // Update swatch to show the shifted base color
249254 const newHue = (BASE_HUE + val) % 360;
250- swatch.style.background = `hsl(${newHue}, 27 %, 43 %)`;
255+ swatch.style.background = `hsl(${newHue}, 35 %, 65 %)`;
251256 });
252257
253258 toggle.addEventListener("click", () => {
You can’t perform that action at this time.
0 commit comments