Abdulkader Safi

The theme preset was a packed integer

A shadcn-vue preset code turned out to be eleven bit-packed parameters. Decoding it by hand gave the exact theme, which forced the Tailwind v4 migration.

2 min read

Share
screenshot of MD Kanban

The board worked but looked like a default. I had a shadcn-vue theme link with a preset code, a2Ac00ld, and pasting it into the project meant first understanding what those eight characters actually encode.

The code is a packed integer

The shadcn-vue CLI ships its preset scheme in the open: eleven design parameters bit-packed into one number, base62 encoded, with a version prefix. Decoding a2Ac00ld by hand gave luma style, mist base color, teal accent, Roboto body with Geist headings, zero radius, Tabler icons, bold inverted menus, pointer cursors. No guessing, no screenshots, just the spec and arithmetic.

The official tokens, not an approximation

With the parameters decoded, the same site's /init endpoint returns the exact registry output for that combination: every color in oklch for light and dark, the font families, the radius, the icon package. I lifted those values verbatim instead of eyeballing a teal.

That forced the Tailwind v3 to v4 migration the project had been postponing. v4 takes oklch tokens directly in CSS-first @theme blocks, so nothing needed gamut-clamped conversion. The old config file and PostCSS setup went away, replaced by the Vite plugin and one stylesheet.

Icons and type

Lucide left, Tabler arrived per the preset, with three gaps mapped to the closest Tabler equivalents. Roboto and Geist ship as fontsource packages so the app stays fully offline. A sun and moon toggle exposes the dark palette, which the project had defined but never switched to.

Where it stands

The board now wears the preset exactly as its author specified it: teal accents, sharp corners, Roboto body, Geist headings. Radius zero turned out to be the most visible single value in the whole preset, which nobody would have predicted from the code alone.

Last updated 6 Sep 2026 · filed under Tailwindcss, vue, shadcn, frontend, ui, ux

Every entry on this project

13 build notes, in order

Including the ones where nothing worked. You are on part 3.

Read the series →

FAQ

Frequently asked questions

How is a shadcn-vue preset code structured?

Eleven design parameters bit-packed into one integer, base62 encoded with a version prefix, using the value tables published in the shadcn-vue CLI source. Decoding is arithmetic: convert from base62, then read each field's bits at its offset.

Why did the theme force Tailwind v4?

Migrate. Tailwind v4 accepts oklch color tokens directly in CSS-first @theme blocks, while v3's hsl triplet scheme would need every out-of-gamut color clamped by hand, losing exactly the saturated tones the theme was chosen for.

Written by

Abdulkader Safi

Software Engineer

Lead engineer at DSRPT, from Lebanon and based in Kuwait. I write about the tools and bugs from real client work, with the numbers I measured.

About me → GitHub LinkedIn

Need this kind of work done on your project?

Start a project →

Keep reading

More from MD Kanban

All 13 entries →