The Tirrenia Palette workspace is a lightweight React + Vite app that showcases Tirrenia’s colour system. It presents curated palette sections with imagery, allows designers to copy hex codes instantly, and exports the full page as a PDF for offline sharing.
- Node.js 20 LTS (any Node ≥18 works with Vite).
cd workspaces/tirrenia-palette
npm installnpm run dev # Start Vite dev server (http://localhost:5173 by default)
npm run build # Production build to dist/
npm run preview # Preview the production build locallyThe app relies on CDN-hosted Tailwind CSS and PDF helpers (html2canvas, jspdf) referenced in index.html, so no additional setup is required.
- Curated sections – Palette data (
paletteDatainindex.tsx) is grouped by theme (Earth & Volcano, Sea & Coast, etc.) with contextual imagery from theassets/directory. - Copy to clipboard – Each swatch exposes a "copy" button that writes the hex value to the clipboard and provides transient feedback.
- Logo downloads – Download buttons allow instant access to brand logos in both PNG (raster) and SVG (vector) formats for use in different contexts.
- PDF export – A "Download PDF" button triggers
html2canvas+jspdfto capture the full page and exportpalette-campania-tradition.pdf. - Responsive layout – Tailwind utility classes ensure the layout adapts from mobile to desktop, with sticky imagery for larger viewports.
workspaces/tirrenia-palette/
├── assets/ # Palette imagery referenced by the UI
├── index.html # Entry HTML (includes Tailwind + PDF libraries)
├── index.tsx # React app with palette data and components
├── src/ # Source files for the palette package (colors.css)
├── dist/ # Built assets for publishing (dist/colors.css)
├── metadata.json # App metadata (used by hosting environments)
├── package.json # Scripts and dependency manifest
├── tsconfig.json # TypeScript configuration
└── vite.config.ts # Vite build configuration
This workspace publishes a canonical CSS file containing only color custom properties at dist/colors.css (source at src/colors.css), plus official brand logos in dist/logos/.
- Treat
@tirrenia/paletteas the single source of truth for colors and brand assets. - Other workspaces should consume the palette via npm and reference variables, e.g.
@import 'node_modules/@tirrenia/palette/dist/colors.css';
body { background: var(--tirrenia-app-background, #F2F0E9); }The package includes official brand logos in both PNG and SVG formats:
- Tirrenia:
dist/logos/logo-tirrenia.png,dist/logos/logo-tirrenia.svg - Caffè al Banco:
dist/logos/logo-caffe-al-banco.png,dist/logos/logo-caffe-al-banco.svg - Caffè al Banco (icon only):
dist/logos/logo-caffe-al-banco-logo-only.svg
To use logos in your application, reference them from the installed package:
<!-- In Angular/React/Vue -->
<img src="node_modules/@tirrenia/palette/dist/logos/logo-tirrenia.svg" alt="Tirrenia" />Or copy them to your public assets during build (see consuming workspace documentation for examples).
When updating colors or logos, edit source files (src/colors.css, assets/logo-*.{png,svg}), build the workspace (npm run build), then bump the package version and re-install the package in consuming workspaces.
The palette page displays official brand logos for Tirrenia and Caffè al Banco, available in both formats:
Located in assets/:
- Tirrenia:
logo-tirrenia.png(raster) andlogo-tirrenia.svg(vector) - Caffè al Banco:
logo-caffe-al-banco.png(raster) andlogo-caffe-al-banco.svg(vector) - Caffè al Banco (logo-only):
logo-caffe-al-banco-logo-only.svg(icon variant without text)
- PNG format: Use for social media profiles, email signatures, PowerPoint presentations, or anywhere raster images are required. PNGs have a fixed resolution but work universally.
- SVG format: Preferred for web applications, print materials, and scalable contexts. SVGs are vector-based, infinitely scalable without quality loss, and can be styled with CSS.
Each logo on the palette page has dedicated PNG and SVG download buttons directly below the image preview. Click the appropriate button to download the format you need.
- Use logos on backgrounds that provide sufficient contrast (refer to the color palette for brand-compliant combinations)
- Maintain aspect ratio when resizing
- For Tirrenia logo, prefer Capri Blue (
#0F5D84) or Tyrrhenian Blue (#2A6FA9) as accent colors - For Caffè al Banco logo, use Coffee Brown (
#8A5B36) or Dark Espresso (#3B2C28) for complementary elements
- Update palette colours or notes inside
paletteDatainindex.tsx. Each item definesname,hex, and optionalnote. - Replace imagery by dropping new assets into
assets/and updating theimageUrlfields. - Tailwind classes are injected via CDN; adjust them directly in JSX or add custom styles inside
<style>blocks inindex.htmlif needed. - PDF export hides the download button during capture (see
handleDownloadPdfinindex.tsx); extend this function if you want to exclude other elements.
The default Vite build emits static assets to dist/. Host them behind any static file server or CDN. Remember that the app loads Tailwind/html2canvas/jspdf from public CDNs; if offline operation is required, vendor those scripts locally and update the <script> tags in index.html.