useThemeColors
Read the resolved theme tokens (colors, spacing, radii, typography) for the current color scheme.
Returns the fully resolved theme object for the current colorScheme ('light' | 'dark') under the nearest <NoriProvider> / <ThemeProvider>. Every component in the library reads its tokens through this hook — use it to style your own components in the same look-and-feel.
Usage
Token surface
The returned object exposes the following families (see Theming for the full token tree):
semantic.{background, text, border, …}— color roles that change with the active scheme.colors.{neutral, primary, danger, success, warning, info}.{50…900}— the raw palette ramps.spacing—0…64numeric scale.radius—xs…full.fontFamily,fontSize,fontWeight,lineHeight,letterSpacing— typography.shadow.{sm, md, lg}— elevation tokens.
Notes
- The returned object is memoized per scheme + theme combo — safe to use as a dependency in
useMemo/useEffectarrays. colors.semantic.*automatically swaps between the active light / dark mapping;colors.colors.*does not.- The hook is client-only — import from
@nori-ui/core/client.
Related
- Theming — token reference + custom theme construction.