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.
- TrenchDark
- ShallowsLight
Android (Jetpack Compose)
Download TrenchTheme.ktAdd it to your app module and wrap your UI in MaterialTheme(colorScheme = if (isSystemInDarkTheme()) TrenchDarkColorScheme else TrenchLightColorScheme) { … }. Every colour is on TrenchDarkTokens too, and the spacing, radii, type and motion are on OvScale, the same in every theme.
// Trench (dark) — generated by openvibe-shared/tokens v1 from the OpenVibe theme "ocean-deep". 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
/** Pressure-dark water with a teal glow. */
object TrenchDarkTokens {
val ColorBgBase = Color(0xFF0A1215)
val ColorBgSurface = Color(0xFF0F1A1F)
val ColorBgSubtle = Color(0xFF162228)
val ColorBgRaised = Color(0xFF121C22)
val ColorBgHover = Color(0xFF1A2A32)
val ColorBgInput = Color(0xFF0C1418)
val ColorTextPrimary = Color(0xFFD0E8EF)
val ColorTextSecondary = Color(0xFF7AA8BA)
val ColorTextMuted = Color(0xFF7494A1)
val ColorAccentBase = Color(0xFF00BCD4)
val ColorAccentLight = Color(0xFF4DD0E1)
val ColorAccentDark = Color(0xFF0097A7)
val ColorAccentStrong = Color(0xFF00BCD4)
val ColorAccentOn = Color(0xFF0B0D10)
val ColorAccentOnStrong = Color(0xFF0B0D10)
val ColorAccentGlow = Color(0x5900BCD4)
val ColorLineBase = Color(0xFF1A3040)
val ColorLineStrong = Color(0xFF2A4050)
val ColorStatusOkBase = Color(0xFF22C55E)
val ColorStatusOkText = Color(0xFF22C55E)
val ColorStatusWarnBase = Color(0xFFF59E0B)
val ColorStatusWarnText = Color(0xFFF59E0B)
val ColorStatusBadBase = Color(0xFFEF4444)
val ColorStatusBadText = Color(0xFFF15E5E)
val ColorStatusInfoBase = Color(0xFF38BDF8)
val ColorStatusInfoText = Color(0xFF38BDF8)
val ColorStatusLiveBase = Color(0xFFEF4444)
val ColorStatusLiveText = Color(0xFFF15E5E)
}
/** Material 3 roles: MaterialTheme(colorScheme = TrenchDarkColorScheme) { … } */
val TrenchDarkColorScheme: ColorScheme = darkColorScheme(
primary = TrenchDarkTokens.ColorAccentBase,
onPrimary = TrenchDarkTokens.ColorAccentOn,
primaryContainer = TrenchDarkTokens.ColorAccentStrong,
onPrimaryContainer = TrenchDarkTokens.ColorAccentOnStrong,
secondary = TrenchDarkTokens.ColorAccentLight,
onSecondary = TrenchDarkTokens.ColorAccentOn,
tertiary = TrenchDarkTokens.ColorStatusInfoBase,
background = TrenchDarkTokens.ColorBgBase,
onBackground = TrenchDarkTokens.ColorTextPrimary,
surface = TrenchDarkTokens.ColorBgRaised,
onSurface = TrenchDarkTokens.ColorTextPrimary,
surfaceVariant = TrenchDarkTokens.ColorBgSurface,
onSurfaceVariant = TrenchDarkTokens.ColorTextSecondary,
outline = TrenchDarkTokens.ColorLineStrong,
outlineVariant = TrenchDarkTokens.ColorLineBase,
error = TrenchDarkTokens.ColorStatusBadBase,
onError = TrenchDarkTokens.ColorAccentOnStrong,
surfaceContainerLowest = TrenchDarkTokens.ColorBgBase,
surfaceContainerLow = TrenchDarkTokens.ColorBgRaised,
surfaceContainer = TrenchDarkTokens.ColorBgRaised,
surfaceContainerHigh = TrenchDarkTokens.ColorBgSurface,
surfaceContainerHighest = TrenchDarkTokens.ColorBgSubtle,
surfaceBright = TrenchDarkTokens.ColorBgHover,
surfaceDim = TrenchDarkTokens.ColorBgBase,
surfaceTint = TrenchDarkTokens.ColorBgRaised,
secondaryContainer = TrenchDarkTokens.ColorBgHover,
onSecondaryContainer = TrenchDarkTokens.ColorAccentLight,
inverseSurface = TrenchDarkTokens.ColorTextPrimary,
inverseOnSurface = TrenchDarkTokens.ColorBgBase,
)
/** Trench in the sun: clear teal water over white sand. */
object TrenchLightTokens {
val ColorBgBase = Color(0xFFF0FAFB)
val ColorBgSurface = Color(0xFFE4F4F6)
val ColorBgSubtle = Color(0xFFD5ECEF)
val ColorBgRaised = Color(0xFFF7FCFD)
val ColorBgHover = Color(0xFFDCF0F2)
val ColorBgInput = Color(0xFFEBF7F8)
val ColorTextPrimary = Color(0xFF0C2226)
val ColorTextSecondary = Color(0xFF3A5458)
val ColorTextMuted = Color(0xFF516B70)
val ColorAccentBase = Color(0xFF007384)
val ColorAccentLight = Color(0xFF00737F)
val ColorAccentDark = Color(0xFF005662)
val ColorAccentStrong = Color(0xFF007384)
val ColorAccentOn = Color(0xFFFFFFFF)
val ColorAccentOnStrong = Color(0xFFFFFFFF)
val ColorAccentGlow = Color(0x59007384)
val ColorLineBase = Color(0xFFC9E3E7)
val ColorLineStrong = Color(0xFFB4D6DB)
val ColorStatusOkBase = Color(0xFF22C55E)
val ColorStatusOkText = Color(0xFF147638)
val ColorStatusWarnBase = Color(0xFFF59E0B)
val ColorStatusWarnText = Color(0xFF8E5C06)
val ColorStatusBadBase = Color(0xFFEF4444)
val ColorStatusBadText = Color(0xFFBA3535)
val ColorStatusInfoBase = Color(0xFF38BDF8)
val ColorStatusInfoText = Color(0xFF206E90)
val ColorStatusLiveBase = Color(0xFFEF4444)
val ColorStatusLiveText = Color(0xFFBA3535)
}
/** Material 3 roles: MaterialTheme(colorScheme = TrenchLightColorScheme) { … } */
val TrenchLightColorScheme: ColorScheme = lightColorScheme(
primary = TrenchLightTokens.ColorAccentBase,
onPrimary = TrenchLightTokens.ColorAccentOn,
primaryContainer = TrenchLightTokens.ColorAccentStrong,
onPrimaryContainer = TrenchLightTokens.ColorAccentOnStrong,
secondary = TrenchLightTokens.ColorAccentLight,
onSecondary = TrenchLightTokens.ColorAccentOn,
tertiary = TrenchLightTokens.ColorStatusInfoBase,
background = TrenchLightTokens.ColorBgBase,
onBackground = TrenchLightTokens.ColorTextPrimary,
surface = TrenchLightTokens.ColorBgRaised,
onSurface = TrenchLightTokens.ColorTextPrimary,
surfaceVariant = TrenchLightTokens.ColorBgSurface,
onSurfaceVariant = TrenchLightTokens.ColorTextSecondary,
outline = TrenchLightTokens.ColorLineStrong,
outlineVariant = TrenchLightTokens.ColorLineBase,
error = TrenchLightTokens.ColorStatusBadBase,
onError = TrenchLightTokens.ColorAccentOnStrong,
surfaceContainerLowest = TrenchLightTokens.ColorBgBase,
surfaceContainerLow = TrenchLightTokens.ColorBgRaised,
surfaceContainer = TrenchLightTokens.ColorBgRaised,
surfaceContainerHigh = TrenchLightTokens.ColorBgSurface,
surfaceContainerHighest = TrenchLightTokens.ColorBgSubtle,
surfaceBright = TrenchLightTokens.ColorBgHover,
surfaceDim = TrenchLightTokens.ColorBgBase,
surfaceTint = TrenchLightTokens.ColorBgRaised,
secondaryContainer = TrenchLightTokens.ColorBgHover,
onSecondaryContainer = TrenchLightTokens.ColorAccentLight,
inverseSurface = TrenchLightTokens.ColorTextPrimary,
inverseOnSurface = TrenchLightTokens.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#0a1215#f0fafbThe page behind everythingcolor.bg.surface#0f1a1f#e4f4f6Bands and side panelscolor.bg.subtle#162228#d5ecefWells, tracks and quiet fillscolor.bg.raised#121c22#f7fcfdCards, rows and sheetscolor.bg.hover#1a2a32#dcf0f2A control under the pointer or fingercolor.bg.input#0c1418#ebf7f8Text fieldscolor.text.primary#d0e8ef#0c2226Body text and titlescolor.text.secondary#7aa8ba#3a5458Supporting textcolor.text.muted#7494a1#516b70Hints and meta linescolor.accent.base#00bcd4#007384Links, icons, focus ringscolor.accent.light#4dd0e1#00737fThe accent a step lightercolor.accent.dark#0097a7#005662The accent a step darkercolor.accent.strong#00bcd4#007384Filled buttonscolor.accent.on#0b0d10#ffffffText on the accentcolor.accent.onStrong#0b0d10#ffffffText on a filled buttoncolor.accent.glowrgba(0,188,212,0.35)rgba(0,115,132,0.35)Glows and haloscolor.line.base#1a3040#c9e3e7Dividers and outlinescolor.line.strong#2a4050#b4d6dbOutlines 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#8e5c06Warning text on any surfacecolor.status.bad.base#ef4444#ef4444Danger fillscolor.status.bad.text#f15e5e#ba3535Danger text on any surfacecolor.status.info.base#38bdf8#38bdf8Information fillscolor.status.info.text#38bdf8#206e90Information text on any surfacecolor.status.live.base#ef4444#ef4444LIVE badgescolor.status.live.text#f15e5e#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.