Colors

The Davis color system uses seven semantic colors, each with a full 50-950 shade range. The 500 shade is the base value.


UI Element Semantic Tokens

ColorBase (500)Use
Primary#127BC4Actions, links, focus rings, interactive elements
Secondary#0F67A6Secondary actions, accents, tags
Tertiary#4076a4Tertiary accents, decorative elements
Success#207537Success states, confirmations, positive actions
Warning#BB5C21Warnings, caution states
Danger#DC3838Errors, destructive actions, validation
Neutral#18181BText, borders, backgrounds (full gray scale)

Only the 500+ shades are compliant with WCAG 2.2 AA success criterion for non-text elements (minimum 3:1 contrast) against white (#FFF) backgrounds. As a general principle, avoid using shades other than the base 500 whenever possible to ensure consistency and accessibility. If you must use a lighter shade, always verify contrast ratios on white backgrounds.

These colors should never be used as text as they do not promote readability or accessibility. The UI element colors are primarily intended for buttons, links, badges, tags, and other interactive or accent elements rather than body text.


Text Semantic Tokens

ColorBase (500)Use
Text#162032Primary text color (WCAG AAA compliant against white)
Neutral#71717ASecondary text, disabled states, captions
White#FFFFFFText on a background of any of the UI Element colors

The general principle for text colors is to use the text color for primary content and the neutral color for secondary or less important text. The white color should only be used for text when placed on top of one of the darker UI element colors (primary, secondary, tertiary, success, warning, danger, etc.) to ensure sufficient contrast.


Surface Semantic Tokens

Surface tokens provide semantic background colors:

Surface

DEFAULT#FFFFFF
muted#F9FAFB
subtle#F4F4F5
hover#F4F4F5
active#E4E4E7
disabled#F4F4F5
TokenValueUse
surface#FFFFFFDefault page/card background
surface-muted#F9FAFBSubtle background differentiation
surface-subtle#F4F4F5Sidebar, footer, secondary areas

If using a non-default surface token, ONLY text or text-neutral should be used for foreground text to ensure sufficient contrast.


Interactive State Tokens

These tokens standardize how surfaces respond to user interaction. They apply to "on-white" elements — ghost/outline buttons, menu items, table rows, nav links, accordion triggers, and any element that sits on a white or light background.

TokenValueTailwind classUse
surface-hover#F4F4F5 (neutral-100)bg-surface-hoverBackground tint on pointer entry
surface-active#E4E4E7 (neutral-200)bg-surface-activeBackground tint on press/click
surface-disabled#F4F4F5 (neutral-100)bg-surface-disabledBackground for unavailable form fields — always pair with opacity-50 and cursor-not-allowed

Why surface-hover and surface-disabled share a hex value: These tokens communicate intent, not just color. Contextual signals — cursor change, opacity-50, aria-disabled, and pointer-events: none — disambiguate disabled states from hovered elements at runtime.

For solid-fill semantic color elements (primary, secondary, danger, etc. buttons), interactive states use the established shade convention rather than the surface tokens:

StateShadeExample
Hover600hover:bg-primary-600 (#106098)
Active/Press700active:bg-primary-700 (#0f4b75)

This pattern applies to all seven semantic color families. See INTERACTIVE in packages/core/src/tokens.ts for the full named alias reference.


Border Color Semantic Tokens

Border colors are split into two categories with different WCAG 2.2 obligations.

Decorative borders (dividers, card edges, table rules) visually separate content but do not mark the boundary of an operable UI component. WCAG SC 1.4.11 Non-text Contrast does not apply to them — lighter neutral shades are acceptable.

Functional borders (inputs, selects, textareas, checkboxes, radio buttons) define the perceivable boundary of a UI component and must meet SC 1.4.11: ≥3:1 contrast against all adjacent colors. Against a white (#FFFFFF) background, neutral-500 (#71717A, 4.83:1) is the minimum compliant shade.

TokenValueShadeContrast vs. whiteUse
border-color-subtle#E4E4E7neutral-2001.27:1Hairline dividers, tight separators
border-color-muted#D4D4D8neutral-3001.48:1Card edges, panels, table rules
border-color#71717Aneutral-5004.83:1 ✓Default input / field border
border-color-strong#52525Bneutral-6007.73:1 ✓Hover state for field borders

Disabled form fields are exempt from SC 1.4.11 per the WCAG specification and continue to use neutral-300 at reduced opacity.


Usage Guidelines

When to use each color

  • Primary — Main call-to-action buttons, links, active/selected states, focus rings. This is the "do something" color.
  • Secondary — Secondary buttons, tags, accent highlights where primary would be too dominant.
  • Tertiary — Decorative accents, non-critical UI elements.
  • Success — Confirmation messages, successful operations, positive badges.
  • Warning — Non-blocking alerts, caution notices, pending states.
  • Danger — Error messages, destructive action buttons, form validation errors.
  • Neutral — Borders, dividers, and disabled states.
  • Text — Primary text color (WCAG AAA compliant against white).

Shade Usage

As noted earlier, the 500 shade is the base color and should be used for most applications. The 600 shade is the standard hover state and the 700 shade is the standard active/pressed state for solid-fill colored elements. Lighter shades (50-400) are generally not recommended for UI elements due to contrast issues but can be very sparingly used for large background areas or decorative purposes. For white-surface elements (ghost buttons, menus, table rows), use the dedicated surface-hover and surface-active tokens instead of raw shade values.

If you're making use of the Davis React or Vue libraries, the components and their variants will automatically apply the appropriate shades based on the design system guidelines, so you can focus on using the semantic color tokens without worrying about specifying shade values. Thus, it's recommended to stick to these variants and avoid manually applying shades (or any styling, for that matter) unless you have a specific need that isn't covered by the existing components.

WCAG AA Text Contrast Pairings

For UI elements with normal text (minimum 4.5:1 ratio, 16px+), the following combinations of background and foreground semantic colors meet WCAG 2.2 AA standards. UI elements with large text (minimum 3:1 ratio, 24px+ or 19px bold) will also meet WCAG AA standards with the same combinations. For more information on font size in the Davis Design System, see the Typography page.

BackgroundForegroundMeets AA?
primary-500text-whiteYes
secondary-500text-whiteYes
tertiary-500text-whiteYes
success-500text-whiteYes
warning-500text-whiteYes
danger-500text-whiteYes
neutral-600+text-whiteYes
whitetextYes
whitetext-neutralYes

Full Color Palettes

primary

50#ebf0f41.1:1
100#dbe7f01.3:1
200#bcd8eb1.5:1
300#8dc2e71.9:1
400#4ca6e62.7:1
500#127BC44.5:1
600#1060986.7:1
700#0f4b759.2:1
800#0d334e13.1:1
900#0c223116.3:1
950#0b192317.8:1

secondary

50#e8eef21.2:1
100#dbe7f01.3:1
200#b4d3e91.6:1
300#81bbe42.1:1
400#369be23.0:1
500#0F67A66.0:1
600#0e51818.4:1
700#0d3f6311.0:1
800#0c2e4614.0:1
900#0b1f2d16.8:1
950#0a161f18.3:1

tertiary

50#edf0f21.1:1
100#e3e8ed1.2:1
200#c7d4e01.5:1
300#a6bed31.9:1
400#77a1c52.7:1
500#4076a44.8:1
600#335c807.0:1
700#2947619.7:1
800#1f324213.2:1
900#16222c16.2:1
950#11171d18.0:1

success

50#eaf1eb1.1:1
100#dbebdf1.2:1
200#b6ddc01.5:1
300#86d09a1.8:1
400#42c2642.3:1
500#2075375.7:1
600#1a5b2b8.2:1
700#16462310.9:1
800#13351c13.5:1
900#0f241516.4:1
950#0c180f18.2:1

warning

50#FFF7ED1.1:1
100#FFEDD51.1:1
200#FED7AA1.4:1
300#FDBA741.7:1
400#F595422.3:1
500#BB5C214.5:1
600#A14D1B5.8:1
700#863E167.7:1
800#6C321410.0:1
900#592B1411.8:1
950#30130A17.2:1

danger

50#FEF2F21.1:1
100#FEE2E21.2:1
200#FECACA1.4:1
300#FCA5A51.9:1
400#F072722.9:1
500#DC38384.5:1
600#C428285.7:1
700#A322227.5:1
800#8722229.2:1
900#71222210.7:1
950#3E0E0E16.5:1

neutral

50#FAFAFA1.0:1
100#F4F4F51.1:1
200#E4E4E71.3:1
300#D4D4D81.5:1
400#A1A1AA2.6:1
500#71717A4.8:1
600#52525B7.7:1
700#3F3F4610.4:1
800#27272A14.9:1
900#18181B17.7:1
950#09090B19.9:1

text

DEFAULT#16203216.3:1
neutral#71717A4.8:1
white#FFFFFF1.0:1