Blog › Tutorials

Customise a Tailwind template: colours, fonts and logo

A 15-minute tutorial for rebranding a React + Tailwind CSS 4 template: change the @theme colour tokens, swap Google Fonts, replace the logo and favicon.

By · · 9 min read

Customise a Tailwind template: colours, fonts and logo

The fastest way to make a template feel like yours isn't rewriting every section. It's three things: your colours, your fonts and your logo. Get those right and a visitor stops seeing "a template" and starts seeing your brand.

In this tutorial I'll show you exactly where those three live in a React + Tailwind CSS 4 template from usetemplates.store, and how to change them in about fifteen minutes. I'll use real files from three templates: Hooma (real estate), Aureon AI (SaaS) and Tidepool (auth screens), because each one handles branding a little differently. (Hooma is based on a UI concept by Ahmad Faizien for OnPoint Studio and Aureon AI on one by Shuvo; Tidepool is my own design.)

What you need

  • The template on your computer, installed with npm install (first run guide)
  • A code editor (VS Code with the Tailwind CSS IntelliSense extension is ideal: it autocompletes your own colour names)
  • Your brand colours as hex values, your font name, and your logo as an SVG or transparent PNG

Start the dev server and keep it running so you see every change instantly:

npm run dev

Then open http://localhost:5173.

Minutes 0–5: colours

Where the colours live

Tailwind CSS 4 moved configuration out of tailwind.config.js and into CSS. In every template, the brand colours are theme tokens in an @theme block at the top of src/index.css. Here's the real block from Hooma:

@import "tailwindcss" source(".");

@theme {
  --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;

  --color-ink: #0b0b0b;
  --color-mist: #f5f5f4;
  --color-cloud: #fafaf9;
  --color-line: #e8e8e6;
  --color-mute: #6b6b6b;
  --color-soft: #a3a3a3;
  --color-star: #22c55e;
}

Each --color-<name> becomes a family of utility classes: bg-ink, text-ink, border-line, ring-star, fill-ink, plus opacity variants like bg-ink/80. That's why one edit here restyles the whole site. Tailwind's theme variables documentation explains the namespaces if you want to go further.

Change the values, keep the names

Token names describe a role, not a colour: ink is the main text, line is borders, mute is secondary text, and an accent like star or rose is for highlights. The trick is to keep the names and change only the values:

--color-star: #e11d48;   /* was #22c55e */

Save, and every element using bg-star or text-star updates. You never have to open a component.

Templates name their tokens to fit their design. Aureon AI, for example, has a dark palette with names like --color-night, --color-coal and a hot pink --color-rose: #ff0a5c as its accent. Tidepool uses an undersea palette: --color-lagoon, --color-glass, --color-sand and --color-coral. Same method, different names. Read the block once and you'll see which token does what.

A quick colour mapping method

If you have a brand guide with three or four colours, map them like this:

Your brandTemplate roleExample token
Primary / accentButtons, highlights, links--color-star, --color-rose, --color-coral
Dark neutralHeadings and body text, dark sections--color-ink
Light neutralPage and card backgrounds--color-mist, --color-cloud, --color-paper
GreySecondary text, borders--color-mute, --color-line

Two checks before you move on:

  1. Contrast. Body text should reach at least 4.5:1 against its background. Paste both hex values into the WebAIM contrast checker. Accent colours on white buttons fail more often than you'd expect.
  2. Leftover hex values. A few colours also appear in plain CSS further down index.css, such as body { background: #fff; } or the ::selection colour. Search the file for the old hex value and replace it there too.

Adding your own colour

Need one more? Add a token and use it straight away:

@theme {
  --color-brand: #0f766e;
}
<button className="bg-brand text-white hover:bg-brand/90">Book now</button>

If a template has a light/dark switch, its dark values sit next to the light ones in index.css (usually under a .dark selector or a @variant dark rule). Change both sets.

Minutes 5–10: fonts

Fonts load from Google Fonts in index.html and are applied through --font-* tokens in the same @theme block.

Hooma uses one family, Manrope, as --font-sans. Aureon AI uses two: Inter Tight for --font-sans and --font-ui, and Instrument Serif italic as --font-serif for accent words. Tidepool pairs Figtree (--font-sans, for inputs and labels) with Bricolage Grotesque (--font-display, for headings).

Swap a font in three steps

  1. Pick your font at fonts.google.com and copy its <link> embed code with the weights you need (for example 400, 500, 600, 700).

  2. In index.html, replace the existing <link href="https://fonts.googleapis.com/css2?family=…"> with yours. Keep the two preconnect lines above it; they make the font load faster.

    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
  3. Update the token in src/index.css:

    --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;

If the template has a second font token (--font-display, --font-serif), repeat for that one. Only load the weights you actually use; every extra weight is another file your visitors download.

A note on pairing

When you swap a display font, check your biggest headline on a phone. Many templates use a custom display utility with tight letter-spacing (Hooma's is -0.045em). A wider typeface can look cramped with that spacing, so loosen it in the @utility display rule in index.css if you need to.

If you prefer not to load fonts from Google (for privacy or speed), you can self-host .woff2 files with @font-face. The colours and fonts docs page has the snippet.

Minutes 10–15: logo, brand name and favicon

The brand name

The name used in the navbar, footer and contact details usually comes from the brand object in src/data/content.js. In Hooma it looks like this:

export const brand = {
  name: 'Aurelia',
  email: '[email protected]',
  phone: '+1 (310) 555-0148',
}

Change it once and the header, footer and contact section follow.

Logos are handled in one of two ways, and it's worth checking which before you start:

  • A text wordmark. Hooma's navbar simply renders {brand.name} in bold, widely spaced capitals. If you're happy with a typographic logo, changing the brand name is all you need.
  • A logo component. Aureon AI has src/components/ui/Brand.jsx, an italic uppercase wordmark. Tidepool's src/components/Brand.jsx draws its marks as inline SVG. Some components contain the name as literal text rather than reading brand.name, so search the project for the old name after you've changed content.js, and for Logo or Brand to find every place the logo is used.

To use your own logo file, save it as SVG (best) or a transparent PNG in src/assets/, then return an image from the component:

import logo from '../../assets/logo.svg'

export default function Brand({ className = 'h-8 w-auto' }) {
  return <img src={logo} alt="Your Business" className={className} />
}

Check the header and footer on desktop and mobile and adjust the height class (h-7, h-8, h-10) until it sits right.

Two tips that save time:

  • Dark backgrounds. If your footer or hero is dark, export a light version of the logo for those places.
  • Single-colour logos. Paste the SVG inline and set fill="currentColor". It then takes the text colour of wherever it sits, so one file works on light and dark. Remember to rename attributes for JSX: class → className, stroke-width → strokeWidth, fill-rule → fillRule.

The favicon

The browser-tab icon is set in index.html. Many templates use a small inline SVG data URL. To replace it:

  1. Create a public/ folder in the project root if there isn't one.

  2. Add public/favicon.svg (or a 512×512 favicon.png) and public/apple-touch-icon.png (180×180, no transparency).

  3. Replace the icon line in index.html:

    <link rel="icon" type="image/svg+xml" href="./favicon.svg" />
    <link rel="apple-touch-icon" href="./apple-touch-icon.png" />

Use paths starting with ./ so they also work if the site is deployed in a sub-folder. And if you still see the old icon, that's your browser's cache, not your code; check in a private window. The logo and favicon page has more detail.

Your 15-minute checklist

  • Accent, text, background and border tokens updated in @theme
  • Old hex values searched and replaced in the rest of index.css
  • Contrast checked for body text and buttons
  • Google Fonts <link> replaced in index.html, preconnects kept
  • --font-* tokens updated
  • brand.name changed in src/data/content.js
  • Project searched for the old brand name and Logo / Brand
  • Logo replaced and checked on desktop, mobile and dark sections
  • Favicon and Apple touch icon added
  • npm run build runs cleanly

What comes next

Colours, fonts and logo are the 15-minute version. The next layer is content and images: text, prices and links in src/data/content.js, and turning sections on or off in src/sections.config.js. Each template also ships with a brand/BRAND.md file listing its current tokens, plus prompt packs for rewriting copy and generating replacement images.

When you're happy with it, follow my deploy tutorial to put it live on Vercel, Netlify or cPanel.

And if you're still choosing a starting point, open a few live previews and imagine your colours on them. A layout you love with the wrong colours is a fifteen-minute fix. A layout that doesn't fit your content is not. Browse the full template catalogue and try them in the preview before you decide.

Yuso

Frequently asked questions

Where are the colours defined in a Tailwind CSS 4 template?

In the @theme block at the top of src/index.css. Each --color-<name> token becomes utilities such as bg-<name>, text-<name> and border-<name>, so changing one hex value restyles every component that uses it.

Is there a tailwind.config.js file to edit?

Not in these templates. Tailwind CSS 4 is configured in CSS, so brand colours, fonts, shadows and radii live as @theme variables in src/index.css.

How do I change the font?

Replace the Google Fonts link in index.html with the embed code for your font, then update the matching --font-sans or --font-display token in src/index.css. Keep the preconnect lines.

What format should my logo be?

SVG is best because it stays sharp at every size and can inherit the text colour. A PNG with a transparent background also works; save it in src/assets/ and import it in the logo component.

Why do I still see the old favicon after changing it?

Browsers cache favicons aggressively. Open the site in a private window or another browser to check the new icon.

Templates in this article

Related articles