Skip to main content

afrigov is an open-source project. It is not a government website and is not affiliated with any government.

Previewing neutral core Change

afrigov Accessible government design system

Country packs

A pack is one JSON file. It declares the official national colours and which of them is the primary. The build derives everything else, checks every colour pair, and writes a stylesheet.

Packs in this release
Country File Official primary Usable primary Banner languages
Ghanagh.css#ce1126#006b3f unchangeden, ak wanted, ee wanted
Kenyake.css#000000#006600 unchangeden, sw
Moroccoma.css#c1272d#c1272d unchangedar, fr, en, zgh wanted
Nigeriang.css#008751#007d4b deriveden, ha wanted, yo wanted, ig wanted
Rwandarw.css#00a1de#0075a7 deriveden, fr, rw wanted, sw wanted
Senegalsn.css#00853f#00803d derivedfr, en, wo wanted
South Africaza.css#de3831#007a4d unchangeden, af, zu wanted, xh wanted, st wanted, nso wanted, tn wanted, ss wanted, ve wanted, ts wanted, nr wanted

Preview the site in a country's colours

Every page of this documentation can be shown with a pack applied, so you see each component in that country's colours, with its banner text, currency, national ID and regions in the examples. The choice is remembered until you reset it.

What a pack carries

  • Official colours, exact, with their source. Used for the flag and decoration.
  • A primary, derived to pass WCAG AA as text if the official value does not.
  • Flag stripes and their direction.
  • Banner strings in each official language, with a default language.
  • Country data the examples and the 0.2 inputs read: currency, national ID, regions, time zone.

Use a pack

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/afrigov@0.15.1/dist/core.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/afrigov@0.15.1/dist/ng.min.css">

To serve more than one country from one page, scope a pack to part of it with data-ag-pack="ke" on any element.

Add your country

Copy tokens/packs/ke.tokens.json, change the values, run pnpm test, open a pull request. The contrast tests run for you. Step by step instructions are in Contributing. Packs wanted: Rwanda, South Africa, Morocco, Uganda, Tanzania, Ethiopia, Côte d'Ivoire, Mozambique.