Skip to content

palette

Named color constants for consistent styling.

ts
import { palette } from 'graticule'

Colors

ConstantValueUsage
palette.BLUE#4169E1Headers, highlights
palette.GREEN#22c55eSuccess, healthy
palette.YELLOW#facc15Warning, degraded
palette.RED#ff0000Error, critical
palette.GRAY#666666Muted text, footers
palette.ORANGE#fb923cAccents
palette.PURPLE#a855f7Accents
palette.CYAN#06b6d4Data, charts

UI Chrome

ConstantValueUsage
palette.AXIS#444444Chart axes
palette.HINT#555555Subtle hints

Screen Defaults

ConstantValueUsage
palette.FG#c0c0c0Default text color
palette.BG#0a0a0aDefault background

Example

ts
const colors: ColorCell[] = []

// color a header blue
for (let i = 0; i < title.length; i++) {
  colors.push({ col: i, row: 0, color: palette.BLUE })
}

// color status text by health
const color = status === 'OK' ? palette.GREEN : palette.RED