Dark Light
System
Default LBBW Jira Confluence Source Code
Share
Playground

Color #

The aFP Design System is built on CSS custom properties, ensuring consistent color usage throughout your project.

Colors are grouped into three main categories:

Each palette (such as base, red, or accent) is defined by a hue and saturation. From these values, lightness steps are generated from 50 (lightest) to 900 (darkest).

The naming convention follows:

--afp-color-{name}-{tint}

Base Colors #

Base colors provide a full spectrum of tints within each palette. They form the foundation of the design system and are applied to backgrounds, borders, and typography to establish hierarchy and maintain accessible contrast.


Brand Colors #

Brand colors are semantic tokens used to communicate meaning and context in the UI. They highlight states, actions, and feedback, helping users quickly interpret importance and intent.


Foundational Colors #

Foundational colors are role-based tokens that provide structure and readability across your theme.

Body #

Body colors define the primary surface and background of your application.
They ensure consistent contrast and readability for all other visual elements placed on top.

Custom Property Preview
--afp-color-body
--afp-color-body-dark
--afp-color-code

Surfaces #

Surface colors define the visual layers of your interface.
They help establish depth and hierarchy by differentiating between background levels such as base, elevated, or lowered areas.

Custom Property Description Preview
--afp-color-surface-default Default background surface, used for primary content areas.
--afp-color-surface-elevated Slightly lighter or higher surface, often used for panels, hovers or dialogs.
--afp-color-surface-lowered Slightly darker or recessed surface, used for footers or nested content sections.
--afp-color-surface-border Used for surface outlines, separators, or structural borders.
--afp-color-surface-border-subtle Softer, lower-contrast border for popovers, overlays, lightweight dividers or fine outlines.

Text #

Text colors are used for standard text elements.

Custom Property Preview
--afp-color-text
AaBb
--afp-color-text-quiet
AaBb
--afp-color-link
AaBb
--afp-color-link-hover
AaBb

Overlay #

Overlays provide a backdrop to isolate content, often allowing background context to show through.

Custom Property Preview
--afp-color-modal

Shadow #

aFP Design System uses a single color for all shadows.
This is used alongside other shadow tokens to construct your theme's shadows.

Custom Property Preview
--afp-color-shadow

Focus #

aFP Design System uses a single color for predictable keyboard navigation on all non-input elements.
Input elements use --afp-color-focus-input alongside other focus tokens to construct your theme’s focus styling.

Custom Property Preview
--afp-color-focus
--afp-color-focus-input
--afp-color-focus-input-border

Border #

Borders use a single color to ensure consistency across components.
This is used alongside other border tokens to construct your theme's borders.

Custom Property Preview
--afp-color-border

Hover and Active #

In the brand palette, hover states are derived by mixing the base value (40) with a lighter step (30).
This approach keeps states harmonized across components while reducing the need for custom overrides.


Semantic Colors #

Semantic colors reinforce specific messages, intended usage, or expected results through familiar, meaningful hues. Each color is identified by its semantic group, role, and attention level using the format:

--afp-color-{group}-{role}-{attention}

Group #

The semantic color system is organized into the following color groups:


Role #

Each semantic color is defined for a specific role in the UI:

This separation ensures that contrast and accessibility are predictable and consistent across the UI.


Attention #

Colors are further categorized by the level of attention they draw:


Examples #

All custom properties in this table actually use the prefix --afp-. For example, --afp-color-brand-fill-quiet corresponds to the brand-fill-quiet cell in the table. The prefix is omitted in the table column for readability.

Custom Property neutral brand accent info warning success error
*-fill-subtle
*-fill-quiet
*-fill-normal
*-fill-loud
*-border-subtle
*-border-quiet
*-border-normal
*-border-loud
*-text-subtle
AaBb
AaBb
AaBb
AaBb
AaBb
AaBb
AaBb
*-text-quiet
AaBb
AaBb
AaBb
AaBb
AaBb
AaBb
AaBb
*-text-normal
AaBb
AaBb
AaBb
AaBb
AaBb
AaBb
AaBb
*-text-loud
AaBb
AaBb
AaBb
AaBb
AaBb
AaBb
AaBb

CSS Classes #

Colors can also be applied using utility-style CSS classes. These classes map directly to the underlying color tokens and are generated at build time.

The syntax follows a simple pattern: afp-{context}:{color}


Example #

Example
<div 
  class="
    afp-padding:space-m
    afp-border-s
    afp-border:surface-border
    afp-text:text
    afp-background:surface-elevated
  "
>
  Example
</div>
<div 
  class="
    afp-padding:space-m
    afp-border-s
    afp-border:surface-border
    afp-text:text
    afp-background:surface-elevated
  "
>
  Example
</div>
<div 
  class="
    afp-padding:space-m
    afp-border-s
    afp-border:surface-border
    afp-text:text
    afp-background:surface-elevated
  "
>
  Example
</div>
<div 
  class="
    afp-padding:space-m
    afp-border-s
    afp-border:surface-border
    afp-text:text
    afp-background:surface-elevated
  "
>
  Example
</div>

In this example:


Contexts #

Context Applies to
afp-background Background color
afp-border Border color
afp-text Text color
Share
Create a link with a predefined theme that is automatically applied when the generated link is opened. Default LBBW Presentation Mode
Abort Copy Link