Recent Colors
A copy-paste color pickers component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Color PickersHTMLCSSany framework
Recent
Copy into your project
HTML
<div class="nuda-recentc">
<span class="nuda-recentc__label">Recent</span>
<div class="nuda-recentc__row">
<button class="nuda-recentc__dot" style="background:#9d6dff"></button>
<button class="nuda-recentc__dot" style="background:#62b6ff"></button>
<!-- More recents -->
</div>
</div>CSS
.nuda-recentc {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 8px 12px;
background: rgba(255,255,255,.02);
border: 1px solid rgba(255,255,255,.06);
border-radius: 99px;
}
.nuda-recentc__label {
font-size: 10px;
color: #63636e;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .08em;
}
.nuda-recentc__row {
display: inline-flex;
gap: 4px;
}
.nuda-recentc__dot {
width: 18px;
height: 18px;
border-radius: 50%;
border: 0;
cursor: pointer;
box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
transition: transform .25s cubic-bezier(.34,1.56,.64,1),box-shadow .2s;
animation: _recIn .4s cubic-bezier(.16,1,.3,1) both;
}
.nuda-recentc__dot:hover {
transform: scale(1.3) translateY(-3px);
box-shadow: inset 0 0 0 2px rgba(255,255,255,.4),0 4px 12px -4px rgba(0,0,0,.5);
}
@keyframes _recIn {
from {
opacity: 0;
transform: scale(.5);
}
to {
opacity: 1;
transform: scale(1);
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-recentc__dot {
animation: none;
}
}
How to use Recent Colors
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.