Color

Color system and semantic tokens

Sugarcoat UI uses a semantic color system that automatically adapts to light and dark themes.

Semantic Colors#

Foreground Colors#

TokenDescription
fg.defaultPrimary text color
fg.mutedSecondary/muted text
fg.subtleTertiary text

Background Colors#

TokenDescription
bg.canvasPage background
bg.subtleSubtle background for sections
bg.mutedMuted background

Brand Colors#

TokenDescription
brand.defaultPrimary brand color
brand.fgText on brand background
brand.emphasisEmphasized brand color

Usage#

Use semantic tokens in your styles:

import { css } from "@sugarcoat/core/css";
 
const styles = css({
  color: "fg.default",
  bg: "bg.canvas",
  borderColor: "border.subtle",
});
Customize Theme
Build your own sugarcoat/ui theme
PresetLime / Violet / Slate
Brand ColorLime
Accent ColorViolet
Gray ScaleSlate
Border RadiusLg