Harmony Row
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-harmony-row" role="radiogroup" aria-label="Palette harmony">
<button type="button" class="nuda-cpk2-harmony-row__swatch is-checked" role="radio"
aria-checked="true" aria-label="Base, hue 262 degrees" style="background:#9d6dff">
<svg class="nuda-cpk2-harmony-row__check" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="3" stroke-linecap="round"
stroke-linejoin="round" aria-hidden="true">
<path d="M20 6 9 17l-5-5" />
</svg>
</button>
<button type="button" class="nuda-cpk2-harmony-row__swatch" role="radio"
aria-checked="false" aria-label="Analogous, hue 292 degrees"
style="background:#c56dff"></button>
<!-- 3 more harmony swatches -->
</div>CSS
.nuda-cpk2-harmony-row {
display: flex;
gap: 6px;
padding: 10px;
background: rgba(255,255,255,.02);
border: 1px solid rgba(255,255,255,.06);
border-radius: 12px;
width: 100%;
max-width: 260px;
}
.nuda-cpk2-harmony-row__swatch {
position: relative;
flex: 1;
aspect-ratio: 1;
min-width: 44px;
min-height: 44px;
border: 0;
border-radius: 8px;
cursor: pointer;
box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
transition: transform .2s cubic-bezier(.34,1.56,.64,1);
animation: _nuda-cpk2harmonyrow .45s cubic-bezier(.16,1,.3,1) both;
}
.nuda-cpk2-harmony-row__swatch:nth-child(2) {
animation-delay: .05s;
}
.nuda-cpk2-harmony-row__swatch:nth-child(3) {
animation-delay: .1s;
}
.nuda-cpk2-harmony-row__swatch:nth-child(4) {
animation-delay: .15s;
}
.nuda-cpk2-harmony-row__swatch:nth-child(5) {
animation-delay: .2s;
}
.nuda-cpk2-harmony-row__swatch:hover {
transform: translateY(-3px);
}
.nuda-cpk2-harmony-row__swatch.is-checked {
box-shadow: inset 0 0 0 2px #0a0a0a,0 0 0 2px #e4ff54;
}
.nuda-cpk2-harmony-row__swatch:focus-visible {
outline: 2px solid #e4ff54;
outline-offset: 2px;
}
.nuda-cpk2-harmony-row__check {
position: absolute;
inset: 0;
margin: auto;
width: 16px;
height: 16px;
color: #fafafa;
filter: drop-shadow(0 1px 2px rgba(0,0,0,.6));
}
@keyframes _nuda-cpk2harmonyrow {
from {
opacity: 0;
transform: translateY(6px) scale(.8);
}
to {
opacity: 1;
transform: none;
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-cpk2-harmony-row__swatch {
animation: none;
transition: none;
}
}
How to use Harmony Row
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.