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.
| Country | File | Official primary | Usable primary | Banner languages |
|---|---|---|---|---|
| Ghana | gh.css | #ce1126 | #006b3f unchanged | en, ak wanted, ee wanted |
| Kenya | ke.css | #000000 | #006600 unchanged | en, sw |
| Morocco | ma.css | #c1272d | #c1272d unchanged | ar, fr, en, zgh wanted |
| Nigeria | ng.css | #008751 | #007d4b derived | en, ha wanted, yo wanted, ig wanted |
| Rwanda | rw.css | #00a1de | #0075a7 derived | en, fr, rw wanted, sw wanted |
| Senegal | sn.css | #00853f | #00803d derived | fr, en, wo wanted |
| South Africa | za.css | #de3831 | #007a4d unchanged | en, 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.
Neutral core
No country. The blue nobody uses.
PreviewGhana
PreviewKenya
PreviewMorocco
PreviewNigeria
PreviewRwanda
PreviewSenegal
PreviewSouth Africa
Preview
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.