Skip to main content
Version: 0.1.22

Colour roles

Tinct defines 49+ semantic colour roles, each with a specific purpose. This page documents all available roles.

Core colours (4)

The foundation of every theme:

RoleDescription
backgroundBase background colour
backgroundMutedMuted/inactive background
foregroundPrimary text colour
foregroundMutedSecondary/dimmed text

Accent colours (8)

Vibrant colours for emphasis and branding:

RoleDescription
accent1Primary accent
accent1MutedMuted variant
accent2Secondary accent
accent2MutedMuted variant
accent3Tertiary accent
accent3MutedMuted variant
accent4Quaternary accent
accent4MutedMuted variant

Semantic colours (5)

Colours with specific meaning:

RolePurposeTypical colour
dangerError, destructive actionsRed
warningWarnings, cautionOrange/Yellow
successSuccess, confirmationGreen
infoInformationBlue
notificationNotificationsPurple

Surface colours - Priority 1 (4)

Essential UI surface colours:

RoleDescription
surfaceCard/sheet backgrounds
onSurfaceText on surface
outlineBorders/dividers
borderPrimary borders

Surface variants - Priority 2 (4)

Extended surface options:

RoleDescription
surfaceVariantAlternate surface
onSurfaceVariantText on variant
borderMutedInactive borders
outlineVariantSecondary outlines

On-colours for accents (4)

Text colours for accent backgrounds:

RoleDescription
onAccent1Text on accent1
onAccent2Text on accent2
onAccent3Text on accent3
onAccent4Text on accent4

On-colours for semantics (4)

Text colours for semantic backgrounds:

RoleDescription
onDangerText on danger
onWarningText on warning
onSuccessText on success
onInfoText on info

Inverse colours (3)

For overlays and inverted contexts:

RoleDescription
inverseSurfaceTooltip/inverse surface
inverseOnSurfaceText on inverse
inversePrimaryAccent on inverse

Overlay colours (2)

Transparency effects:

RoleAlphaDescription
scrim32%Modal backdrop
shadow15%Elevation shadow

Container elevation (5)

Surface hierarchy through elevation:

RoleLevelDescription
surfaceContainerLowest0Base level
surfaceContainerLow1Slightly raised
surfaceContainer2Default cards
surfaceContainerHigh3Prominent
surfaceContainerHighest4Dialogs, menus

Positional colours (30+)

For ambient lighting and LED strips:

Core 8 positions

positionTopLeft      positionTop      positionTopRight
positionLeft positionRight
positionBottomLeft positionBottom positionBottomRight

Extended 12+ positions

Additional positions for finer-grained control:

positionTopLeftInner    positionTopCenter    positionTopRightInner
positionCenterLeft positionCenter positionCenterRight
positionBottomLeftInner positionBottomCenter positionBottomRightInner

16+ ultra-extended positions

Full grid including additional edge midpoints.

Using roles in templates

Access roles in output plugin templates:

# Core colours
{{ get . "background" | hex }}
{{ get . "foreground" | hex }}

# Semantic colours
{{ get . "danger" | hex }}
{{ get . "success" | hex }}

# With alpha
{{ get . "scrim" | rgba }}

Role priority

When extracting from images, roles are assigned in priority order:

  1. Priority 0 (Core): background, foreground
  2. Priority 1 (Accents): accent1-4
  3. Priority 2 (Semantic): danger, warning, success, info
  4. Priority 3 (Surface): Generated from background
  5. Priority 4 (On-colours): Calculated for contrast
  6. Positional: Extracted separately with ambient mode

Manual role assignment

Override automatic assignment:

tinct generate -i file \
--file.colors "#1e1e2e,#cdd6f4,#89b4fa,#f38ba8" \
--file.hints "background=0,foreground=1,accent1=2,danger=3" \
-o all

Next steps