Skip to main content

Color

Color is used in DHIS2 to support effective communication. DHIS2 applications use color to help the user understand information, feedback and more. The colors used in an application should not be chosen based primarily on how they look, but how they convey information and aid understanding.

It is important to maintain consistent usage of colors throughout the DHIS2 platform. Globally, color meanings are relative. It is not possible to say "red = danger". However, using a consistent color palette we can establish that "red in DHIS2 = danger".

Color alone should not be relied upon to communicate effectively. Read more about color accessibility.

DHIS2 Color Scale

Example swatches of the UI color scale
The UI color scale

The UI color scale contains 7 colors. Each color has 10 shades. This color system provides enough colors for all situations.

Reference: Color codes and #hex values for the UI color scale.

General, simplified principles

Each color in the UI color scale has a purpose. Put simply:

  • Grey: general interface elements, neutral information
  • Blue: important neutral information, primary actions
  • Teal: selected or active elements
  • Red: danger, error, destructive action
  • Yellow: warning, non-blocking error
  • Green: positive feedback, valid, success

Generally speaking, for all colors, the values also have a purpose:

  • 900–700: text, information, active or highlighted content
  • 600–300: icons, states (inactive, disabled, etc.)
  • 200–050: backgrounds, tints, accents

Using color

Color usage in DHIS2 applications should be subtle. Reserve colors for when they need to communicate effectively. For example:

Usage of color

Error and danger colors

Consistent use of color

Accessibility

Do not rely on color alone to communicate. Not everyone sees color the same. Relying on color to communicate will restrict access for partially sighted, color blind and users with low-quality display hardware.

Always use color with another method, such as text formatting or icon usage, to communicate.

Relying on color alone to signal an error to a user is problematic. For example:

Colorblind simulation

Pay attention to contrast too. Information dense text needs to satisfy a minimum contrast ratio of 7:1 to be accessible to all users and headers and secondary text should pass a 4.5:1 ratio:

Contrast example

Remember, when dealing with accessibility issues that designs may work or be understandable on your screen, but not necessarily on others. Make sure to think of all kinds of users with all kinds of hardware when designing with accessibility in mind. Use an WCAG2.0 standard accessibility checker to check contrast. Aim for AAA rating for all essential interface elements.

A DHIS2 instance can be themed. Adjusting theme colors will overwrite the blue and teal colors of the scale.

When selecting theme colors, make sure they do not clash with the colors established in the DHIS2 color scale. Using red for the main header bar will confuse: is the header bar in an error state? -->

Color Scale Reference

NameHex
grey050grey050#FBFCFD
grey100grey100#F8F9FA
grey200grey200#F3F5F7
grey300grey300#E8EDF2
grey400grey400#D5DDE5
grey500grey500#A0ADBA
grey600grey600#6C7787
grey700grey700#4A5768
grey800grey800#404B5A
grey900grey900#212934
NameHex
blue050blue050#f5fbff
blue100blue100#e3f2fd
blue200blue200#c5e3fc
blue300blue300#90caf9
blue400blue400#42a5f5
blue500blue500#2196f3
blue600blue600#147cd7
blue700blue700#1565c0
blue800blue800#0d47a1
blue900blue900#093371
NameHex
teal050teal050#f1f9f9
teal100teal100#e0f2f1
teal200teal200#b2dfdb
teal300teal300#4db6ac
teal400teal400#009688
teal500teal500#00897b
teal600teal600#00796b
teal700teal700#00695c
teal800teal800#004d40
teal900teal900#00332b
NameHex
red050red050#fff5f6
red100red100#ffe5e8
red200red200#ffcdd2
red300red300#e57373
red400red400#f44336
red500red500#d32f2f
red600red600#c62828
red700red700#b71c1c
red800red800#891515
red900red900#330202
NameHex
yellow050yellow050#fff8e1
yellow100yellow100#ffecb3
yellow200yellow200#ffe082
yellow300yellow300#ffc324
yellow400yellow400#ffa902
yellow500yellow500#ff9302
yellow600yellow600#ff8302
yellow700yellow700#e56408
yellow800yellow800#bb460d
yellow900yellow900#6f3205
NameHex
green050green050#f4fbf4
green100green100#e8f5e9
green200green200#c8e6c9
green300green300#a5d6a7
green400green400#4caf50
green500green500#43a047
green600green600#388e3c
green700green700#2e7d32
green800green800#1b5e20
green900green900#103713