Skip to Content
API ReferenceTheme Tokens

Theme Tokens

RNCopilot uses a semantic token system with light and dark themes. All tokens are accessed through the theme object inside StyleSheet.create callbacks. This page lists every available token and its value in both themes.

The primary palette is Indigo (#6366F1 light / #818CF8 dark) with a Teal accent (#14B8A6 light / #2DD4BF dark). The design is clean and professional, optimized for both light and dark environments.

Colors

Access via theme.colors.<category>.<token>.

brand

TokenLightDark
primary#6366F1#818CF8
secondary#1E293B#CBD5E1
tertiary#14B8A6#2DD4BF
primaryVariant#4F46E5#A5B4FC
secondaryVariant#334155#E2E8F0

background

TokenLightDark
app#F8FAFC#0F172A
surface#FFFFFF#192236
surfaceAlt#F1F5F9#262F44
section#EEF2FF#1E293B
elevated#F8FAFF#253348
input#F1F5F9#1F2B3D
disabled#E2E8F0#172035
modal#FFFFFF#1E293B

text

TokenLightDark
primary#0F172A#F1F5F9
secondary#334155#CBD5E1
tertiary#64748B#94A3B8
muted#94A3B8#64748B
inverse#FFFFFF#0F172A
accent#14B8A6#2DD4BF
link#6366F1#818CF8
linkHover#4F46E5#A5B4FC

border

TokenLightDark
default#E2E8F0#2C3548
subtle#F1F5F9#192236
strong#CBD5E1#3D4A5E
focus#6366F1#818CF8
disabled#E2E8F0#172035

icon

TokenLightDark
primary#6366F1#818CF8
secondary#1E293B#CBD5E1
tertiary#94A3B8#64748B
muted#CBD5E1#475569
inverse#FFFFFF#0F172A
accent#14B8A6#2DD4BF

state

TokenLightDark
success#10B981rgba(52, 211, 153, 0.8)
successBg#ECFDF5rgba(16, 185, 129, 0.15)
warning#F59E0B#FBBF24
warningBgrgba(245, 158, 11, 0.12)rgba(251, 191, 36, 0.2)
error#EF4444#F87171
errorBgrgba(239, 68, 68, 0.12)rgba(248, 113, 113, 0.2)
info#3B82F6#60A5FA
infoBgrgba(59, 130, 246, 0.12)rgba(96, 165, 250, 0.2)
disabled#CBD5E1#475569

overlay

TokenLightDark
modalrgba(0, 0, 0, 0.5)rgba(0, 0, 0, 0.7)
pressedrgba(99, 102, 241, 0.12)rgba(129, 140, 248, 0.15)
hoverrgba(99, 102, 241, 0.08)rgba(129, 140, 248, 0.08)
focusrgba(99, 102, 241, 0.15)rgba(129, 140, 248, 0.2)
ripplergba(255, 255, 255, 0.25)rgba(255, 255, 255, 0.2)
shadowrgba(0, 0, 0, 0.1)rgba(0, 0, 0, 0.5)

gradient

Each gradient is an array of two color stops.

TokenLightDark
primary['#4F46E5', '#6366F1']['#1E293B', '#818CF8']
secondary['#6366F1', '#818CF8']['#818CF8', '#A5B4FC']
accent['#0D9488', '#14B8A6']['#0F766E', '#2DD4BF']
success['#059669', '#34D399']['#059669', '#34D399']
highlight['#7C3AED', '#A78BFA']['#6D28D9', '#A78BFA']

shadow

TokenLightDark
colorrgba(0, 0, 0, 0.1)rgba(0, 0, 0, 0.5)
elevation46
elevationSmall22
elevationMedium46
elevationLarge812

mode

Access via theme.colors.mode. Returns 'light' or 'dark'.

const styles = StyleSheet.create((theme) => ({ container: { // Conditional styles based on theme mode shadowOpacity: theme.colors.mode === 'dark' ? 0.3 : 0.1, }, }));

Spacing

Access via theme.metrics.spacing.* (horizontal) and theme.metrics.spacingV.* (vertical).

All spacing values are responsive — horizontal spacing scales via hs() (based on screen width 390), vertical spacing scales via vs() (based on screen height 844).

Horizontal Spacing (theme.metrics.spacing)

TokenBase ValueScaled Via
p44hs(4)
p88hs(8)
p1212hs(12)
p1616hs(16)
p2020hs(20)
p2424hs(24)
p2828hs(28)
p3232hs(32)
p3636hs(36)
p4040hs(40)
p4444hs(44)
p4848hs(48)
p5252hs(52)
p5656hs(56)
p6060hs(60)
p6464hs(64)
p6868hs(68)
p7272hs(72)
p7676hs(76)
p8080hs(80)
p8484hs(84)
p8888hs(88)
p9292hs(92)
p9696hs(96)
p100100hs(100)
p104104hs(104)
p108108hs(108)
p112112hs(112)
p116116hs(116)
p120120hs(120)

Vertical Spacing (theme.metrics.spacingV)

Same tokens (p4 through p120) scaled via vs() instead of hs().


Font Sizes

Access via theme.metrics.fontSize.*. All sizes are responsive, scaled via rf() based on screen width 390.

TokenBase ValueScaled Via
xxs10rf(10)
xs12rf(12)
sm14rf(14)
md16rf(16)
lg18rf(18)
xl20rf(20)
2xl24rf(24)
3xl30rf(30)
4xl36rf(36)
5xl48rf(48)
6xl60rf(60)

Border Radius

Access via theme.metrics.borderRadius.*. Values are scaled via hs() except full.

TokenBase Value
xshs(4)
smhs(6)
mdhs(8)
lghs(12)
xlhs(16)
full999

Icon Sizes

Access via theme.metrics.iconSize.*. Values are scaled via hs().

TokenBase Value
xshs(14)
smhs(16)
mdhs(18)
lghs(20)
xlhs(24)

Responsive Helpers

These functions are available from @/theme/metrics for values not covered by tokens:

import { rf, hs, vs } from '@/theme/metrics';
FunctionPurposeBase
rf(n)Responsive font sizeScreen width / 390
hs(n)Horizontal scaleScreen width / 390
vs(n)Vertical scaleScreen height / 844

Prefer theme tokens (theme.metrics.spacing.p16) over calling helpers directly (hs(16)). The tokens are pre-computed and keep your styles declarative. Use the helpers only for custom values that don’t have a matching token.

Last updated on