OpenVibe Tokens
Your theme, as code
Take any OpenVibe theme into your own app, its light and dark halves together: the web, Android, iOS, Flutter or Figma. The colours are the ones the network paints.
- UnderstoryDark
- MeadowLight
Android (Jetpack Compose)
Download UnderstoryTheme.ktAdd it to your app module and wrap your UI in MaterialTheme(colorScheme = if (isSystemInDarkTheme()) UnderstoryDarkColorScheme else UnderstoryLightColorScheme) { … }. Every colour is on UnderstoryDarkTokens too, and the spacing, radii, type and motion are on OvScale, the same in every theme.
// Understory (dark) — generated by openvibe-shared/tokens v1 from the OpenVibe theme "forest". Regenerate instead of editing.
package network.openvibe.theme
import androidx.compose.material3.ColorScheme
import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
/** Deep greens under the canopy. */
object UnderstoryDarkTokens {
val ColorBgBase = Color(0xFF0A120A)
val ColorBgSurface = Color(0xFF121E12)
val ColorBgSubtle = Color(0xFF1A2A1A)
val ColorBgRaised = Color(0xFF152015)
val ColorBgHover = Color(0xFF1E3420)
val ColorBgInput = Color(0xFF0D160D)
val ColorTextPrimary = Color(0xFFD4E8D4)
val ColorTextSecondary = Color(0xFF8AAA8A)
val ColorTextMuted = Color(0xFF849E84)
val ColorAccentBase = Color(0xFF4ADE80)
val ColorAccentLight = Color(0xFF86EFAC)
val ColorAccentDark = Color(0xFF22C55E)
val ColorAccentStrong = Color(0xFF4ADE80)
val ColorAccentOn = Color(0xFF0B0D10)
val ColorAccentOnStrong = Color(0xFF0B0D10)
val ColorAccentGlow = Color(0x594ADE80)
val ColorLineBase = Color(0xFF1A3A1A)
val ColorLineStrong = Color(0xFF2A4A2A)
val ColorStatusOkBase = Color(0xFF22C55E)
val ColorStatusOkText = Color(0xFF22C55E)
val ColorStatusWarnBase = Color(0xFFF59E0B)
val ColorStatusWarnText = Color(0xFFF59E0B)
val ColorStatusBadBase = Color(0xFFEF4444)
val ColorStatusBadText = Color(0xFFF36D6D)
val ColorStatusInfoBase = Color(0xFF38BDF8)
val ColorStatusInfoText = Color(0xFF38BDF8)
val ColorStatusLiveBase = Color(0xFFEF4444)
val ColorStatusLiveText = Color(0xFFF36D6D)
}
/** Material 3 roles: MaterialTheme(colorScheme = UnderstoryDarkColorScheme) { … } */
val UnderstoryDarkColorScheme: ColorScheme = darkColorScheme(
primary = UnderstoryDarkTokens.ColorAccentBase,
onPrimary = UnderstoryDarkTokens.ColorAccentOn,
primaryContainer = UnderstoryDarkTokens.ColorAccentStrong,
onPrimaryContainer = UnderstoryDarkTokens.ColorAccentOnStrong,
secondary = UnderstoryDarkTokens.ColorAccentLight,
onSecondary = UnderstoryDarkTokens.ColorAccentOn,
tertiary = UnderstoryDarkTokens.ColorStatusInfoBase,
background = UnderstoryDarkTokens.ColorBgBase,
onBackground = UnderstoryDarkTokens.ColorTextPrimary,
surface = UnderstoryDarkTokens.ColorBgRaised,
onSurface = UnderstoryDarkTokens.ColorTextPrimary,
surfaceVariant = UnderstoryDarkTokens.ColorBgSurface,
onSurfaceVariant = UnderstoryDarkTokens.ColorTextSecondary,
outline = UnderstoryDarkTokens.ColorLineStrong,
outlineVariant = UnderstoryDarkTokens.ColorLineBase,
error = UnderstoryDarkTokens.ColorStatusBadBase,
onError = UnderstoryDarkTokens.ColorAccentOnStrong,
surfaceContainerLowest = UnderstoryDarkTokens.ColorBgBase,
surfaceContainerLow = UnderstoryDarkTokens.ColorBgRaised,
surfaceContainer = UnderstoryDarkTokens.ColorBgRaised,
surfaceContainerHigh = UnderstoryDarkTokens.ColorBgSurface,
surfaceContainerHighest = UnderstoryDarkTokens.ColorBgSubtle,
surfaceBright = UnderstoryDarkTokens.ColorBgHover,
surfaceDim = UnderstoryDarkTokens.ColorBgBase,
surfaceTint = UnderstoryDarkTokens.ColorBgRaised,
secondaryContainer = UnderstoryDarkTokens.ColorBgHover,
onSecondaryContainer = UnderstoryDarkTokens.ColorAccentLight,
inverseSurface = UnderstoryDarkTokens.ColorTextPrimary,
inverseOnSurface = UnderstoryDarkTokens.ColorBgBase,
)
/** Spring greens in daylight. */
object UnderstoryLightTokens {
val ColorBgBase = Color(0xFFF2F8F0)
val ColorBgSurface = Color(0xFFE8F0E4)
val ColorBgSubtle = Color(0xFFDCE8D6)
val ColorBgRaised = Color(0xFFF5FAF2)
val ColorBgHover = Color(0xFFE4F0DE)
val ColorBgInput = Color(0xFFEDF5EA)
val ColorTextPrimary = Color(0xFF1A2E16)
val ColorTextSecondary = Color(0xFF3A5A32)
val ColorTextMuted = Color(0xFF526B4A)
val ColorAccentBase = Color(0xFF137538)
val ColorAccentLight = Color(0xFF147638)
val ColorAccentDark = Color(0xFF15803D)
val ColorAccentStrong = Color(0xFF137538)
val ColorAccentOn = Color(0xFFFFFFFF)
val ColorAccentOnStrong = Color(0xFFFFFFFF)
val ColorAccentGlow = Color(0x59137538)
val ColorLineBase = Color(0xFFC8DCC0)
val ColorLineStrong = Color(0xFFB0CCAA)
val ColorStatusOkBase = Color(0xFF22C55E)
val ColorStatusOkText = Color(0xFF147638)
val ColorStatusWarnBase = Color(0xFFF59E0B)
val ColorStatusWarnText = Color(0xFF895806)
val ColorStatusBadBase = Color(0xFFEF4444)
val ColorStatusBadText = Color(0xFFBA3535)
val ColorStatusInfoBase = Color(0xFF38BDF8)
val ColorStatusInfoText = Color(0xFF1F6A8B)
val ColorStatusLiveBase = Color(0xFFEF4444)
val ColorStatusLiveText = Color(0xFFBA3535)
}
/** Material 3 roles: MaterialTheme(colorScheme = UnderstoryLightColorScheme) { … } */
val UnderstoryLightColorScheme: ColorScheme = lightColorScheme(
primary = UnderstoryLightTokens.ColorAccentBase,
onPrimary = UnderstoryLightTokens.ColorAccentOn,
primaryContainer = UnderstoryLightTokens.ColorAccentStrong,
onPrimaryContainer = UnderstoryLightTokens.ColorAccentOnStrong,
secondary = UnderstoryLightTokens.ColorAccentLight,
onSecondary = UnderstoryLightTokens.ColorAccentOn,
tertiary = UnderstoryLightTokens.ColorStatusInfoBase,
background = UnderstoryLightTokens.ColorBgBase,
onBackground = UnderstoryLightTokens.ColorTextPrimary,
surface = UnderstoryLightTokens.ColorBgRaised,
onSurface = UnderstoryLightTokens.ColorTextPrimary,
surfaceVariant = UnderstoryLightTokens.ColorBgSurface,
onSurfaceVariant = UnderstoryLightTokens.ColorTextSecondary,
outline = UnderstoryLightTokens.ColorLineStrong,
outlineVariant = UnderstoryLightTokens.ColorLineBase,
error = UnderstoryLightTokens.ColorStatusBadBase,
onError = UnderstoryLightTokens.ColorAccentOnStrong,
surfaceContainerLowest = UnderstoryLightTokens.ColorBgBase,
surfaceContainerLow = UnderstoryLightTokens.ColorBgRaised,
surfaceContainer = UnderstoryLightTokens.ColorBgRaised,
surfaceContainerHigh = UnderstoryLightTokens.ColorBgSurface,
surfaceContainerHighest = UnderstoryLightTokens.ColorBgSubtle,
surfaceBright = UnderstoryLightTokens.ColorBgHover,
surfaceDim = UnderstoryLightTokens.ColorBgBase,
surfaceTint = UnderstoryLightTokens.ColorBgRaised,
secondaryContainer = UnderstoryLightTokens.ColorBgHover,
onSecondaryContainer = UnderstoryLightTokens.ColorAccentLight,
inverseSurface = UnderstoryLightTokens.ColorTextPrimary,
inverseOnSurface = UnderstoryLightTokens.ColorBgBase,
)
/** The OpenVibe kit's radius, space, size, type and motion scales: the same in every theme. */
object OvScale {
val RadiusSm = 10.dp
val RadiusMd = 14.dp
val RadiusLg = 20.dp
val RadiusPill = 999.dp
val SpaceXs = 4.dp
val SpaceSm = 8.dp
val SpaceMd = 12.dp
val SpaceLg = 16.dp
val SpaceXl = 24.dp
val SpaceXxl = 32.dp
val SizeTap = 44.dp
val SizeIcon = 20.dp
val SizeAvatar = 34.dp
val TypeSizeCaption = 12.sp
val TypeSizeMeta = 13.sp
val TypeSizeBody = 15.sp
val TypeSizeLead = 17.sp
val TypeSizeTitle = 20.sp
val TypeSizeHeadline = 24.sp
val TypeSizeDisplay = 34.sp
const val TypeWeightRegular = 400
const val TypeWeightMedium = 600
const val TypeWeightBold = 700
const val TypeWeightHeavy = 800
const val MotionDurationFast = 180
const val MotionDurationBase = 260
const val MotionDurationSlow = 360
const val MotionDurationReduced = 0
}
Files your tools can fetch
This theme on its own, with the motion every OpenVibe page shares and the mark’s colours. Each one has a lasting address a build or a design tool can read straight from here.
Every colour token · 28 of them
color.bg.base#0a120a#f2f8f0The page behind everythingcolor.bg.surface#121e12#e8f0e4Bands and side panelscolor.bg.subtle#1a2a1a#dce8d6Wells, tracks and quiet fillscolor.bg.raised#152015#f5faf2Cards, rows and sheetscolor.bg.hover#1e3420#e4f0deA control under the pointer or fingercolor.bg.input#0d160d#edf5eaText fieldscolor.text.primary#d4e8d4#1a2e16Body text and titlescolor.text.secondary#8aaa8a#3a5a32Supporting textcolor.text.muted#849e84#526b4aHints and meta linescolor.accent.base#4ade80#137538Links, icons, focus ringscolor.accent.light#86efac#147638The accent a step lightercolor.accent.dark#22c55e#15803dThe accent a step darkercolor.accent.strong#4ade80#137538Filled buttonscolor.accent.on#0b0d10#ffffffText on the accentcolor.accent.onStrong#0b0d10#ffffffText on a filled buttoncolor.accent.glowrgba(74,222,128,0.35)rgba(19,117,56,0.35)Glows and haloscolor.line.base#1a3a1a#c8dcc0Dividers and outlinescolor.line.strong#2a4a2a#b0ccaaOutlines that must showcolor.status.ok.base#22c55e#22c55eSuccess fillscolor.status.ok.text#22c55e#147638Success text on any surfacecolor.status.warn.base#f59e0b#f59e0bWarning fillscolor.status.warn.text#f59e0b#895806Warning text on any surfacecolor.status.bad.base#ef4444#ef4444Danger fillscolor.status.bad.text#f36d6d#ba3535Danger text on any surfacecolor.status.info.base#38bdf8#38bdf8Information fillscolor.status.info.text#38bdf8#1f6a8bInformation text on any surfacecolor.status.live.base#ef4444#ef4444LIVE badgescolor.status.live.text#f36d6d#ba3535LIVE text on any surface
Every theme also carries the kit's scales: radius.*, space.* (4 to 32), size.tap (44), type.size.*, type.weight.* and motion.*.
Why tokens, and what is next
A theme on OpenVibe is one set of design tokens: semantic names such as color.accent.strong and space.lg, kept apart from any one platform. The web reads them as CSS variables today. An Android or iOS app reads the same values in Compose or SwiftUI, so a native app wears your theme without being a web page in a frame.
The format is the W3C Design Tokens one, so the same file works in Style Dictionary, Tokens Studio and Figma. Next: the kit's components described the same way (anatomy, states, roles), so a page made on OpenVibe.Design can be drawn natively too.