Saturation Value Pad
A copy-paste color pickers component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Color PickersHTMLCSSany framework
Copy into your project
HTML
<div class="nuda-cpk2-sv-square">
<div class="nuda-cpk2-sv-square__pad" aria-hidden="true">
<span class="nuda-cpk2-sv-square__handle" role="slider" tabindex="0"
aria-label="Saturation and value" aria-valuemin="0" aria-valuemax="100"
aria-valuenow="65" aria-valuetext="Saturation 65%, value 85%"
style="transform:translate(150px,35px)"></span>
</div>
<div class="nuda-cpk2-sv-square__rail">
<label id="cpk2-sv-square-hue-label" for="cpk2-sv-square-hue">Hue</label>
<input id="cpk2-sv-square-hue" class="nuda-cpk2-sv-square__hue" type="range"
min="0" max="360" value="210" aria-labelledby="cpk2-sv-square-hue-label"
aria-valuetext="Hue 210 degrees, blue">
</div>
</div>CSS
.nuda-cpk2-sv-square {
display: flex;
flex-direction: column;
gap: 10px;
padding: 12px;
background: rgba(255,255,255,.02);
border: 1px solid rgba(255,255,255,.06);
border-radius: 12px;
width: 100%;
max-width: 240px;
}
.nuda-cpk2-sv-square__pad {
position: relative;
height: 140px;
border-radius: 8px;
background: linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,#1c8bff);
cursor: crosshair;
}
.nuda-cpk2-sv-square__handle {
position: absolute;
top: 0;
left: 0;
width: 16px;
height: 16px;
margin: -8px;
border-radius: 50%;
border: 2px solid #fafafa;
box-shadow: 0 0 0 1px rgba(0,0,0,.5),0 2px 6px rgba(0,0,0,.5);
cursor: grab;
transition: transform .18s cubic-bezier(.16,1,.3,1);
}
.nuda-cpk2-sv-square__handle:hover {
transform: translate(150px,35px) scale(1.15);
}
.nuda-cpk2-sv-square__handle:focus-visible {
outline: 2px solid #e4ff54;
outline-offset: 2px;
}
.nuda-cpk2-sv-square__rail {
display: flex;
align-items: center;
gap: 8px;
}
.nuda-cpk2-sv-square__rail label {
font-size: 10px;
color: #777;
width: 24px;
}
.nuda-cpk2-sv-square__hue {
-webkit-appearance: none;
appearance: none;
flex: 1;
height: 44px;
background: transparent;
cursor: pointer;
}
.nuda-cpk2-sv-square__hue::-webkit-slider-runnable-track {
height: 10px;
border-radius: 99px;
background: linear-gradient(90deg,#ff5e7a,#ffb45e,#e4ff54,#6ee7b7,#62b6ff,#9d6dff,#ff6dd4,#ff5e7a);
}
.nuda-cpk2-sv-square__hue::-moz-range-track {
height: 10px;
border-radius: 99px;
background: linear-gradient(90deg,#ff5e7a,#ffb45e,#e4ff54,#6ee7b7,#62b6ff,#9d6dff,#ff6dd4,#ff5e7a);
}
.nuda-cpk2-sv-square__hue::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 18px;
height: 18px;
margin-top: -4px;
border-radius: 50%;
background: #fafafa;
border: 2px solid #0c0c10;
box-shadow: 0 0 0 1px rgba(255,255,255,.4);
cursor: grab;
transition: transform .2s;
}
.nuda-cpk2-sv-square__hue::-webkit-slider-thumb:hover {
transform: scale(1.15);
}
.nuda-cpk2-sv-square__hue::-moz-range-thumb {
width: 18px;
height: 18px;
border-radius: 50%;
background: #fafafa;
border: 2px solid #0c0c10;
box-shadow: 0 0 0 1px rgba(255,255,255,.4);
cursor: grab;
}
.nuda-cpk2-sv-square__hue:focus-visible {
outline: none;
}
.nuda-cpk2-sv-square__hue:focus-visible::-webkit-slider-thumb {
outline: 2px solid #e4ff54;
outline-offset: 2px;
}
@media (prefers-reduced-motion:reduce) {
.nuda-cpk2-sv-square__handle,.nuda-cpk2-sv-square__hue::-webkit-slider-thumb {
transition: none;
}
}
How to use Saturation Value Pad
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.