Add an organisation's brand colour
An organistion’s brand colour is used to style their organisation page (such as dividing lines, icons and link text). For example see the DCMS organisation page.
The colour is set as an option under a drop down field called “brand colour” when creating or editing an organisation page in Whitehall Publisher.
1. Add the brand colour in GOV.UK Frontend
It may be some time before the next version of
govuk-frontendis released, to get the changes out on time you can add the colour in
govuk_publishing_components, see this PR as an example.
2. Add the organisation as brand colour option in Whitehall
Add a new entry for the organisation in app/models/organisation_brand_colour.rb, which will show
the organisation as an option under the brand colour drop down field in Whitehall.
The CSS class name should match the name used in
Testing your changes locally
package.jsonto point to your local
govuk-frontendrepo, then update the package, see this doc for more details
collections, update the Gemfile to point to your local version of
whitehall, you should see the organisation as an option under the
brand colourfield (you will also need to update the
Status on GOV.UKto
currently liveto view the page)
collectionsto view the organisation’s page
It may take some time for the colour to update on the page in
integration. You might be able to speed up the process by running the
publishing_api:republish_organisation[slug]rake task in Whitehall.