Your Theme Is Data Too
Brand colours as a JSON database with presets — emerald forest green, Sigiriya sunset gold — turned into CSS variables at runtime.
Lesson 3 of 10 · Tourism Tech · built from Nora Travels, Nora Labs, Mahesh Travellers and my hospitality sites
Tourism brands change palettes for seasons, partners and campaigns. If colours live in code, every change is a deploy. In Nora Travels, colours work like a database.
Example — theme.json
{
"activeTheme": "noraTravelsSignature",
"themes": {
"noraTravelsSignature": {
"name": "Nora Travels Signature",
"description": "Emerald forest green, sunset gold, and warm Ceylon ivory",
"colors": {
"primary": "#143d30",
"secondary": "#d49b38",
"accent": "#e76f51",
"surface": "#ffffff",
"surfaceSubtle": "#fbfaf7",
"text": "#11231c",
"footerBg": "#11231c"
}
}
}
}Example — palette to CSS variables
export function getActiveTheme(): ThemeConfig {
const activeKey = themeData.activeTheme as keyof typeof themeData.themes;
return themeData.themes[activeKey] || themeData.themes.googleCloudClassic;
}
export function generateCssVariables(colors: ThemeColors): string {
return `
:root {
--brand-primary: ${colors.primary};
--brand-secondary: ${colors.secondary};
--brand-surface: ${colors.surface};
--brand-text: ${colors.text};
}`;
}// tailwind.config.js — utilities read the variables, with a fallback
brand: {
primary: 'var(--brand-primary, #1a73e8)',
surface: 'var(--brand-surface, #ffffff)',
}The portal ships presets — Google Cloud Classic, Ceylon Sapphire, Emerald Tea Valley, Sigiriya Golden Ochre — and an on-page palette switcher. Changing the brand is a JSON edit.
Exercise
Add a "Monsoon Slate" preset. Which three variables change the feel most: primary, surface or footerBg?
Keep going: ← Lesson 2 · Lesson 4 →
ExerciseKnowledge check
What does generateCssVariables() produce in the Nora Travels portal?
Finished this one?
Progress is saved in this browser.
Projects in this lesson

AI Agents
Nora Labs
Tourthon 2026 AI-driven multi-agent platform for bespoke Sri Lankan travel itineraries, live driver dispatch, and instant dynamic booking.

Client Web
Mahesh Travellers
Next.js dynamic tourism booking portal showcasing bespoke Sri Lankan tour packages, Ella hiking, cultural heritage, and private driver services.


