Fair Case

Color

Our colours as roles for light and dark, and the palette they read. Every value here comes from the tokens in @repo/ui.

Roles

What a colour is for. Components use roles, never raw values, and each role has a light and a dark value. Contrast is against the page in that scheme, cut to one decimal.

Surfaces and text

The ground, what sits on it, and the lines between.

Surfaces and text
RoleLightDark
--role-pageThe page ground
Light ground#FAFDFF
text 17.6:1
Dark dark-ground#00172E
text 17.6:1
--role-raisedRaised panels: menus, notices, the Ask box
Light ground#FAFDFF
text 17.6:1
Dark dark-ground#00172E
text 17.6:1
--role-heroTinted panels and the hero
Light tint#EEF6FF
text 16.5:1
Dark slate#122A43
text 14.2:1
--role-hoverHover and tinted surfaces
Light tint#EEF6FF
text 16.5:1
Dark slate#122A43
text 14.2:1
--role-textText
Light ink#00172E
17.6:1
Dark dark-text#FAFDFF
17.6:1
--role-mutedSecondary text
Light muted#4A5D72
6.6:1
Dark dark-muted#9FB3C8
8.3:1
--role-ruleBorders and rings
Light rule#B2D5FF
1.4:1, not for text
Dark dark-rule#23446A
1.8:1, not for text

Action and focus

Where a reader can act, and where the keyboard is.

Action and focus
RoleLightDark
--role-accentActions and links
Light action#0E6FD6
4.8:1
Dark dark-accent#7EB7FF
8.6:1
--role-accent-hoverAn action, hovered
Light royal#143D8D
9.8:1
Dark rule#B2D5FF
11.9:1
--role-on-accentText on an accent fill
Light ground#FAFDFF
on accent 4.8:1
Dark dark-ground#00172E
on accent 8.6:1
--role-signalAn active control's fill
Light signal#0D84FF
3.5:1
Dark dark-accent#7EB7FF
8.6:1
--role-on-signalText and icons on a signal fill
Light ground#FAFDFF
on signal 3.5:1
Dark dark-ground#00172E
on signal 8.6:1
--role-focusFocus rings
Light signal#0D84FF
3.5:1
Dark dark-accent#7EB7FF
8.6:1

States

Error, warning, success and info each have a text colour, an icon, a surface and a ring. A state colour is never decoration, and the brand blues never mean a state.

States
RoleLightDark
--role-errorError text
Light error#B3261E
6.3:1
Dark dark-error#FF9B8F
8.8:1
--role-error-iconError icons
Light error#B3261E
6.3:1
Dark dark-error#FF9B8F
8.8:1
--role-error-surfaceError notices
Light error-surface#FDEDEB
error text 5.7:1
Dark dark-error-surface#3A1A22
error text 7.6:1
--role-error-ringThe ring on an error notice
Light error#B3261E
6.3:1, not for text
Dark dark-error#FF9B8F
8.8:1, not for text
--role-warningWarning text
Light warning#8A5300
6.1:1
Dark dark-warning#F5C66B
11.3:1
--role-warning-iconWarning icons
Light warning#8A5300
6.1:1
Dark dark-warning#F5C66B
11.3:1
--role-warning-surfaceWarning notices
Light warning-surface#FFF4DC
warning text 5.7:1
Dark dark-warning-surface#33290F
warning text 8.9:1
--role-warning-ringThe ring on a warning notice
Light warning#8A5300
6.1:1, not for text
Dark dark-warning#F5C66B
11.3:1, not for text
--role-successSuccess text
Light success#1D7A3E
5.2:1
Dark dark-success#7FD8A0
10.5:1
--role-success-iconSuccess icons
Light success#1D7A3E
5.2:1
Dark dark-success#7FD8A0
10.5:1
--role-success-surfaceSuccess notices
Light success-surface#E8F5EC
success text 4.7:1
Dark dark-success-surface#0F3322
success text 8.0:1
--role-success-ringThe ring on a success notice
Light success#1D7A3E
5.2:1, not for text
Dark dark-success#7FD8A0
10.5:1, not for text
--role-infoInfo text
Light ink#00172E
17.6:1
Dark dark-text#FAFDFF
17.6:1
--role-info-iconInfo icons
Light muted#4A5D72
6.6:1
Dark dark-muted#9FB3C8
8.3:1
--role-info-surfaceInfo notices
Light tint#EEF6FF
info text 16.5:1
Dark slate#122A43
info text 14.2:1
--role-info-ringThe ring on an info notice
Light muted#4A5D72
6.6:1, not for text
Dark dark-muted#9FB3C8
8.3:1, not for text

Tones and opacities

Translucent fills and shadows, and two opacities. Each is one colour at a percent, so it has no single contrast.

Tones and opacities
RoleLightDark
--role-overlayThe wash behind controls on a photo
Light ground 72%#FAFDFF
Dark dark-ground 55%#00172E
--role-controlThe resting fill of a round control
Light ink 6%#00172E
Dark ground 8%#FAFDFF
--role-trackA track: the fill behind a bar, and a pressed control
Light ink 14%#00172E
Dark ground 18%#FAFDFF
--role-dotThe inactive dots of the photo stepper
Light ink 34%#00172E
Dark ground 35%#FAFDFF
--role-shadowShadows under popups
Light ink 8%#00172E
Dark shadow-dark 30%#000000
--role-scrimThe dim behind a sheet
Light ink 40%#00172E
Dark shadow-dark 60%#000000
--role-photo-opacityThe hero photo's overlay opacity
Light 0.1
Dark 0.05
--role-glow-opacityThe hero glow's opacity
Light 0.6
Dark 0.08

App shell

Only an app that draws a shell loads these: this site and the signed-in lawyer pages.

App shell
RoleLightDark
--role-shellThe ground under the sidebar
Light tint#EEF6FF
text 16.5:1
Dark dark-ground#00172E
text 17.6:1
--role-surfaceThe inset surface the page sits on
Light ground#FAFDFF
text 17.6:1
Dark slate 50% over dark-ground#092139
text 15.9:1
--role-shell-hoverA hovered row on the shell
Light ground#FAFDFF
text 17.6:1
Dark slate#122A43
text 14.2:1

The palette

The raw values the roles read. Nothing outside the token files uses them directly.

Brand

  • ground#FAFDFF
  • ink#00172E
  • muted#4A5D72
  • rule#B2D5FF
  • tint#EEF6FF
  • action#0E6FD6
  • signal#0D84FF
  • royal#143D8D
  • periwinkle#6493EA
  • slate#122A43

State colours

  • error#B3261E
  • error-surface#FDEDEB
  • warning#8A5300
  • warning-surface#FFF4DC
  • success#1D7A3E
  • success-surface#E8F5EC

Dark scheme

  • dark-ground#00172E
  • dark-text#FAFDFF
  • dark-muted#9FB3C8
  • dark-rule#23446A
  • dark-accent#7EB7FF

Dark scheme state colours

  • dark-error#FF9B8F
  • dark-error-surface#3A1A22
  • dark-warning#F5C66B
  • dark-warning-surface#33290F
  • dark-success#7FD8A0
  • dark-success-surface#0F3322
  • shadow-dark#000000