Screenshot to Lovable: getting exact colors, fonts, and spacing
You paste a screenshot into Lovable, and the result is close, but the blue is off, the font is “similar”, and everything feels a little too loose. That’s not Lovable being bad; it’s guessing values it was never given. Here’s how to give it the values.
Colors: sample, then name them
Use any color picker on the screenshot and sample the background, the main text, the muted text, borders, and the accent. Then write them as a small token list. Named tokens keep the builder consistent across every component:
--bg #05060Apage background--accent #2F6BFFbuttons and links
Sample flat areas, not gradients or anti-aliased edges, and zoom in to avoid compression artefacts.
Fonts: find the closest match
If you can’t identify the exact font, name the closest free one (usually a Google Font) and describe what matters: geometric or humanist, weight, how tight the letter spacing is, and whether headings are uppercase. Sizes matter as much as the family: give each text style a pixel size and line height.
Spacing: measure a few, derive the rest
Measure the key distances (page margin, gap between sections, gap between cards, button padding) and round them to a scale such as 4 or 8px. Stating “8px spacing scale; sections 120px apart” fixes the “too loose” look better than any adjective.
Put it together, then iterate precisely
Lead the prompt with the token list and type scale, then the layout. When something is still off, correct it with a value (“card radius 16px, not 8px”), not a feeling.
Or skip the measuring
Recast samples the colors and measures the type and spacing from the pixels, then writes them into the prompt as tokens. Here’s a real excerpt from a dark SaaS hero.
Visual style
- Colors:
--bg#02030A: page background.--bg-2#070A1A: deep navy used in the vignette.--text#FFFFFF: all primary text.--text-muted#D9DEEA: paragraph text, used at about 95% opacity.--accent#2A8BF5: primary buttons and the badge dot.--accent-hover#4A9EFF--accent-press#1C72D6--nav-bgrgba(10,12,20,0.72): nav pill fill.--nav-borderrgba(255,255,255,0.28): nav pill border.--badge-border#3552C8: dark blue badge outline.--badge-bgrgba(6,10,30,0.55)- Particle and glow tones: #3E6BFF (royal blue), #37A6FF (cyan core), #6A4BF0 (violet), #9B6BFF (lilac sparks).
- Typography:
- Headline: closest Google Font is "Pixelify Sans" (fallback "Departure Mono", "Silkscreen", monospace), weight 400. Aim for a crisp bitmap-grotesk look with stair-stepped curves, set in mixed case. Size is about 96px desktop (
clamp(48px, 7.5vw, 104px)), line-height 1.0, letter-spacing -0.02em, color #FFFFFF. - Logo wordmark: "Anchor AI" in "Pixelify Sans" or "Space Mono" (fallback monospace), 26px, weight 400, letter-spacing 0.02em.
- UI and body: "Inter" (fallback system-ui, sans-serif).
- Headline: closest Google Font is "Pixelify Sans" (fallback "Departure Mono", "Silkscreen", monospace), weight 400. Aim for a crisp bitmap-grotesk look with stair-stepped curves, set in mixed case. Size is about 96px desktop (
Common questions
Why doesn’t Lovable match my screenshot exactly?
An image gives it the look but not the values. Without hex codes, font names, and pixel sizes it approximates, so small differences add up.
How do I find the exact font from a screenshot?
Use a font identifier, or name the closest Google Font and specify the size, weight, letter spacing, and case, which matter more than the exact family.
Should I give Lovable hex codes or color names?
Hex codes, ideally as named tokens like --accent #2F6BFF. Color names are too vague to reproduce a design.
More guides
Try it on your own design.
Drop in a screenshot, hero video, or screen recording, and Recast writes the exact prompt to rebuild it in v0, Lovable, Bolt, Claude Code, or Cursor.
Join the waitlist