Skip to main content

This is a draft (version 0.5.0). The National Information Technology Agency (NITA) plans to make GGDS official guidance for government websites after independent accessibility testing. What this means

Ghana Government Design System Design system for Government of Ghana websites – home Search

Themes

A theme gives a website its institution's colour. Everything else stays the same on every government website.

What a theme changes

A theme is one colour. GGDS works out a deeper shade of it and uses the two in five places only: the line under the header, the institution's name, the homepage hero, the footer, and the institution's card in a list.

Links, buttons, form fields and messages never change colour. Someone who has used one government website can then use any other. In the previews below, the button and the link look the same in every theme.

Make a theme

Type or pick your institution's colour. The builder checks that it can be read, shows it on a page, and gives you the theme to copy or download: a stylesheet for developers and design tokens for designers. If the colour is too light, it suggests the nearest shade that passes.

The theme builder needs JavaScript. Without it, make a theme on the command line with npx @ggds/themes '#rrggbb': see make a theme in code.

Ready-made themes

These use each institution's current website colour. Each institution still has to confirm its colour, so treat them as provisional. To change one, open it in the builder.

  • Ministry of Communication, Digital Technology and Innovations

    MoCDTI

    What do you need help with?

  • Cyber Security Authority

    CSA

    What do you need help with?

  • Data Protection Commission

    DPC

    What do you need help with?

  • Ghana Digital Centres Limited

    GDCL

    What do you need help with?

  • Ghana Domain Name Registry

    GDNR

    What do you need help with?

  • Ghana Investment Fund for Electronic Communications

    GIFEC

    What do you need help with?

  • Ghana Meteorological Agency

    GMet

    What do you need help with?

  • Ghana Post Company Limited

    Ghana Post

    What do you need help with?

  • Ghana-India Kofi Annan Centre of Excellence in ICT

    GI-KACE

    What do you need help with?

  • National Communications Authority

    NCA

    What do you need help with?

  • National Information Technology Agency

    NITA

    What do you need help with?

  • Postal and Courier Services Regulatory Commission

    PCSRC

    What do you need help with?

Theme colours, contrast and files
InstitutionTheme nameColourDark shadeColour on whiteWhite on dark shadeFiles
MoCDTI defaultmocdti #005f8f #005d8c6.92:17.13:1CSS for MoCDTI Figma tokens for MoCDTI Open in the builder: MoCDTI
CSAcsa #222164 #22216414.29:114.29:1CSS for CSA Figma tokens for CSA Open in the builder: CSA
DPCdpc #1276bc #0e5c934.84:17.07:1CSS for DPC Figma tokens for DPC Open in the builder: DPC
GDCLgdcl #006e35 #0067326.40:17.03:1CSS for GDCL Figma tokens for GDCL Open in the builder: GDCL
GDNRgdnr #1848f0 #1744e26.51:17.09:1CSS for GDNR Figma tokens for GDNR Open in the builder: GDNR
GIFECgifec #003f87 #003f8710.19:110.19:1CSS for GIFEC Figma tokens for GIFEC Open in the builder: GIFEC
GMetgmet #21438c #21438c9.35:19.35:1CSS for GMet Figma tokens for GMet Open in the builder: GMet
Ghana Postgpcl #0c075b #0c075b17.54:117.54:1CSS for Ghana Post Figma tokens for Ghana Post Open in the builder: Ghana Post
GI-KACEgi-kace #0808af #0808af12.62:112.62:1CSS for GI-KACE Figma tokens for GI-KACE Open in the builder: GI-KACE
NCAnca #061f45 #061f4516.28:116.28:1CSS for NCA Figma tokens for NCA Open in the builder: NCA
NITAnita #00342b #00342b13.76:113.76:1CSS for NITA Figma tokens for NITA Open in the builder: NITA
PCSRCpcsrc #ca0a15 #b209125.89:17.14:1CSS for PCSRC Figma tokens for PCSRC Open in the builder: PCSRC

See any theme on a whole page: open a template in the showcase and choose the theme at the top.

Use a theme on your website

The default theme, MoCDTI's, comes with ggds.css: you need nothing else. For any other theme, load its stylesheet after ggds.css. A ready-made theme has a name from the table above. A theme you made is the file you downloaded.

Any website

HTML
<link rel="stylesheet" href="ggds/ggds.min.css">
<link rel="stylesheet" href="ggds/themes/<theme>.css">

React, Astro, Vite and other builds with npm

Terminal
npm install @ggds/css @ggds/themes
JavaScript
import '@ggds/css/ggds.css';
import '@ggds/themes/<theme>.css';   // or your own file: import './theme.css';

Django

Name the theme in {% ggds_assets %}. For a theme you made, save the file as static/ggds/themes/<name>.css in your project and use that name.

Django template
{% load ggds %}
{% ggds_assets theme="<theme>" %}

WordPress

In Appearance > Customise > GGDS, choose your institution's theme.

Several institutions on one page

For a page that shows several institutions, such as a list of a ministry's agencies, load themes.css and mark each one with data-ggds-theme. For an institution without a ready-made theme, give it a theme name in the builder (or --slug on the command line): its file then themes only the parts marked with that name.

HTML
<link rel="stylesheet" href="ggds/themes/themes.css">

<li class="ggds-card ggds-card--institution" data-ggds-theme="nca">…</li>
<li class="ggds-card ggds-card--institution" data-ggds-theme="gmet">…</li>

Themes are stylesheets, never inline styles, so they work on websites with a strict Content Security Policy. Never set the colours in a style attribute.

Make a theme in code

The command line makes the same files as the builder, with no code to write. It needs Node.js.

Terminal
npx @ggds/themes check '#7fb3d5'                  # does it pass? If not, the nearest shade that does
npx @ggds/themes '#006e35' --out theme.css         # the stylesheet
npx @ggds/themes '#006e35' --format tokens --out theme.tokens.json   # design tokens
npx @ggds/themes '#006e35' --slug my-agency        # only for data-ggds-theme="my-agency"
npx @ggds/themes list                              # the ready-made themes

In a build script, use the functions the command line uses, from @ggds/tokens/institution.mjs. They work in the browser too.

JavaScript
import { checkInstitutionColour, institutionCss, institutionTokens } from '@ggds/tokens/institution.mjs';

checkInstitutionColour('#7fb3d5');   // { ok: false, suggestion: '#577b92', checks: [...], ... }
institutionCss('#006e35');           // the stylesheet for the whole site
institutionCss('#006e35', { slug: 'my-agency', name: 'My Agency' });
institutionTokens('#006e35');        // design tokens (W3C format)

Use a theme in Figma

Each theme comes as design tokens in the W3C format, with the same names developers use: color/institution/default and color/institution/deep. So a design and the website it becomes use the same colours.

  1. Download the tokens: Figma tokens in the table of ready-made themes, or Download theme.tokens.json in the builder.
  2. In Figma, open Local variables and choose Import. Choose the file. For several institutions, import each file as a mode of the same collection, then switch modes to see a design in each theme.
  3. Use color/institution/default for the header line, the institution name and cards, and color/institution/deep for the hero and footer. Nowhere else.

The files also work with Tokens Studio and Style Dictionary. The other GGDS colours, sizes and spacing are on Foundations.

The rules every theme keeps

  • The colour has at least 4.5:1 contrast on white, because the institution's name is written in it.
  • The deep shade has at least 7:1 contrast under white text and 4.5:1 under the gold purpose line. GGDS darkens your colour only as far as that needs, so it keeps its hue.
  • A theme cannot change links, buttons, focus, form fields or messages.

The builder, the command line and the website build all use the same rule, so a theme that passes in one passes in all of them.

Back to top

Something wrong, unclear or missing? Report a problem with this page. You need a GitHub account.