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.

Android (Jetpack Compose)

Download MatrixTheme.kt

Add it to your app module and wrap your UI in MaterialTheme(colorScheme = if (isSystemInDarkTheme()) MatrixDarkColorScheme else MatrixLightColorScheme) { … }. Every colour is on MatrixDarkTokens too, and the spacing, radii, type and motion are on OvScale, the same in every theme.

// Matrix (dark) — generated by openvibe-shared/tokens v1 from the OpenVibe theme "matrix". 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

/** Green phosphor on black. */
object MatrixDarkTokens {
    val ColorBgBase = Color(0xFF000000)
    val ColorBgSurface = Color(0xFF050A05)
    val ColorBgSubtle = Color(0xFF0A140A)
    val ColorBgRaised = Color(0xFF071007)
    val ColorBgHover = Color(0xFF0E1E0E)
    val ColorBgInput = Color(0xFF030803)
    val ColorTextPrimary = Color(0xFF00FF41)
    val ColorTextSecondary = Color(0xFF00B030)
    val ColorTextMuted = Color(0xFF149836)
    val ColorAccentBase = Color(0xFF00FF41)
    val ColorAccentLight = Color(0xFF66FF8A)
    val ColorAccentDark = Color(0xFF00AA2A)
    val ColorAccentStrong = Color(0xFF00FF41)
    val ColorAccentOn = Color(0xFF0B0D10)
    val ColorAccentOnStrong = Color(0xFF0B0D10)
    val ColorAccentGlow = Color(0x5900FF41)
    val ColorLineBase = Color(0xFF0A2A0A)
    val ColorLineStrong = Color(0xFF144014)
    val ColorStatusOkBase = Color(0xFF22C55E)
    val ColorStatusOkText = Color(0xFF22C55E)
    val ColorStatusWarnBase = Color(0xFFF59E0B)
    val ColorStatusWarnText = Color(0xFFF59E0B)
    val ColorStatusBadBase = Color(0xFFEF4444)
    val ColorStatusBadText = Color(0xFFEF4444)
    val ColorStatusInfoBase = Color(0xFF38BDF8)
    val ColorStatusInfoText = Color(0xFF38BDF8)
    val ColorStatusLiveBase = Color(0xFFEF4444)
    val ColorStatusLiveText = Color(0xFFEF4444)
}

/** Material 3 roles: MaterialTheme(colorScheme = MatrixDarkColorScheme) { … } */
val MatrixDarkColorScheme: ColorScheme = darkColorScheme(
    primary = MatrixDarkTokens.ColorAccentBase,
    onPrimary = MatrixDarkTokens.ColorAccentOn,
    primaryContainer = MatrixDarkTokens.ColorAccentStrong,
    onPrimaryContainer = MatrixDarkTokens.ColorAccentOnStrong,
    secondary = MatrixDarkTokens.ColorAccentLight,
    onSecondary = MatrixDarkTokens.ColorAccentOn,
    tertiary = MatrixDarkTokens.ColorStatusInfoBase,
    background = MatrixDarkTokens.ColorBgBase,
    onBackground = MatrixDarkTokens.ColorTextPrimary,
    surface = MatrixDarkTokens.ColorBgRaised,
    onSurface = MatrixDarkTokens.ColorTextPrimary,
    surfaceVariant = MatrixDarkTokens.ColorBgSurface,
    onSurfaceVariant = MatrixDarkTokens.ColorTextSecondary,
    outline = MatrixDarkTokens.ColorLineStrong,
    outlineVariant = MatrixDarkTokens.ColorLineBase,
    error = MatrixDarkTokens.ColorStatusBadBase,
    onError = MatrixDarkTokens.ColorAccentOnStrong,
    surfaceContainerLowest = MatrixDarkTokens.ColorBgBase,
    surfaceContainerLow = MatrixDarkTokens.ColorBgRaised,
    surfaceContainer = MatrixDarkTokens.ColorBgRaised,
    surfaceContainerHigh = MatrixDarkTokens.ColorBgSurface,
    surfaceContainerHighest = MatrixDarkTokens.ColorBgSubtle,
    surfaceBright = MatrixDarkTokens.ColorBgHover,
    surfaceDim = MatrixDarkTokens.ColorBgBase,
    surfaceTint = MatrixDarkTokens.ColorBgRaised,
    secondaryContainer = MatrixDarkTokens.ColorBgHover,
    onSecondaryContainer = MatrixDarkTokens.ColorAccentLight,
    inverseSurface = MatrixDarkTokens.ColorTextPrimary,
    inverseOnSurface = MatrixDarkTokens.ColorBgBase,
)

/** Matrix on paper: green-bar printout green on white. */
object MatrixLightTokens {
    val ColorBgBase = Color(0xFFF4FAF3)
    val ColorBgSurface = Color(0xFFE9F4E7)
    val ColorBgSubtle = Color(0xFFDCECD9)
    val ColorBgRaised = Color(0xFFF9FDF8)
    val ColorBgHover = Color(0xFFE2F0DF)
    val ColorBgInput = Color(0xFFEFF7ED)
    val ColorTextPrimary = Color(0xFF0D1F10)
    val ColorTextSecondary = Color(0xFF3B5240)
    val ColorTextMuted = Color(0xFF556E5A)
    val ColorAccentBase = Color(0xFF13782B)
    val ColorAccentLight = Color(0xFF18772C)
    val ColorAccentDark = Color(0xFF0B5A1F)
    val ColorAccentStrong = Color(0xFF13782B)
    val ColorAccentOn = Color(0xFFFFFFFF)
    val ColorAccentOnStrong = Color(0xFFFFFFFF)
    val ColorAccentGlow = Color(0x5913782B)
    val ColorLineBase = Color(0xFFCFE3CB)
    val ColorLineStrong = Color(0xFFBCD7B7)
    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 = MatrixLightColorScheme) { … } */
val MatrixLightColorScheme: ColorScheme = lightColorScheme(
    primary = MatrixLightTokens.ColorAccentBase,
    onPrimary = MatrixLightTokens.ColorAccentOn,
    primaryContainer = MatrixLightTokens.ColorAccentStrong,
    onPrimaryContainer = MatrixLightTokens.ColorAccentOnStrong,
    secondary = MatrixLightTokens.ColorAccentLight,
    onSecondary = MatrixLightTokens.ColorAccentOn,
    tertiary = MatrixLightTokens.ColorStatusInfoBase,
    background = MatrixLightTokens.ColorBgBase,
    onBackground = MatrixLightTokens.ColorTextPrimary,
    surface = MatrixLightTokens.ColorBgRaised,
    onSurface = MatrixLightTokens.ColorTextPrimary,
    surfaceVariant = MatrixLightTokens.ColorBgSurface,
    onSurfaceVariant = MatrixLightTokens.ColorTextSecondary,
    outline = MatrixLightTokens.ColorLineStrong,
    outlineVariant = MatrixLightTokens.ColorLineBase,
    error = MatrixLightTokens.ColorStatusBadBase,
    onError = MatrixLightTokens.ColorAccentOnStrong,
    surfaceContainerLowest = MatrixLightTokens.ColorBgBase,
    surfaceContainerLow = MatrixLightTokens.ColorBgRaised,
    surfaceContainer = MatrixLightTokens.ColorBgRaised,
    surfaceContainerHigh = MatrixLightTokens.ColorBgSurface,
    surfaceContainerHighest = MatrixLightTokens.ColorBgSubtle,
    surfaceBright = MatrixLightTokens.ColorBgHover,
    surfaceDim = MatrixLightTokens.ColorBgBase,
    surfaceTint = MatrixLightTokens.ColorBgRaised,
    secondaryContainer = MatrixLightTokens.ColorBgHover,
    onSecondaryContainer = MatrixLightTokens.ColorAccentLight,
    inverseSurface = MatrixLightTokens.ColorTextPrimary,
    inverseOnSurface = MatrixLightTokens.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#000000#f4faf3The page behind everything
  • color.bg.surface#050a05#e9f4e7Bands and side panels
  • color.bg.subtle#0a140a#dcecd9Wells, tracks and quiet fills
  • color.bg.raised#071007#f9fdf8Cards, rows and sheets
  • color.bg.hover#0e1e0e#e2f0dfA control under the pointer or finger
  • color.bg.input#030803#eff7edText fields
  • color.text.primary#00ff41#0d1f10Body text and titles
  • color.text.secondary#00b030#3b5240Supporting text
  • color.text.muted#149836#556e5aHints and meta lines
  • color.accent.base#00ff41#13782bLinks, icons, focus rings
  • color.accent.light#66ff8a#18772cThe accent a step lighter
  • color.accent.dark#00aa2a#0b5a1fThe accent a step darker
  • color.accent.strong#00ff41#13782bFilled buttons
  • color.accent.on#0b0d10#ffffffText on the accent
  • color.accent.onStrong#0b0d10#ffffffText on a filled button
  • color.accent.glowrgba(0,255,65,0.35)rgba(19,120,43,0.35)Glows and halos
  • color.line.base#0a2a0a#cfe3cbDividers and outlines
  • color.line.strong#144014#bcd7b7Outlines that must show
  • color.status.ok.base#22c55e#22c55eSuccess fills
  • color.status.ok.text#22c55e#147638Success text on any surface
  • color.status.warn.base#f59e0b#f59e0bWarning fills
  • color.status.warn.text#f59e0b#8e5c06Warning text on any surface
  • color.status.bad.base#ef4444#ef4444Danger fills
  • color.status.bad.text#ef4444#ba3535Danger text on any surface
  • color.status.info.base#38bdf8#38bdf8Information fills
  • color.status.info.text#38bdf8#206e90Information text on any surface
  • color.status.live.base#ef4444#ef4444LIVE badges
  • color.status.live.text#ef4444#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.

Change this theme in the studio The tokens API