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 ArcticTheme.kt

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

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

/** Frost surfaces, cyan light, crisp white text. */
object ArcticDarkTokens {
    val ColorBgBase = Color(0xFF0B1620)
    val ColorBgSurface = Color(0xFF0F1E2B)
    val ColorBgSubtle = Color(0xFF163040)
    val ColorBgRaised = Color(0xFF122534)
    val ColorBgHover = Color(0xFF1A3A4C)
    val ColorBgInput = Color(0xFF0C1A26)
    val ColorTextPrimary = Color(0xFFEAF6FF)
    val ColorTextSecondary = Color(0xFF9EC3D8)
    val ColorTextMuted = Color(0xFF81A5BB)
    val ColorAccentBase = Color(0xFF22D3EE)
    val ColorAccentLight = Color(0xFFA5F3FC)
    val ColorAccentDark = Color(0xFF0891B2)
    val ColorAccentStrong = Color(0xFF22D3EE)
    val ColorAccentOn = Color(0xFF0B0D10)
    val ColorAccentOnStrong = Color(0xFF0B0D10)
    val ColorAccentGlow = Color(0x5922D3EE)
    val ColorLineBase = Color(0xFF1E3F52)
    val ColorLineStrong = Color(0xFF2A5268)
    val ColorStatusOkBase = Color(0xFF34D399)
    val ColorStatusOkText = Color(0xFF34D399)
    val ColorStatusWarnBase = Color(0xFFF59E0B)
    val ColorStatusWarnText = Color(0xFFF59E0B)
    val ColorStatusBadBase = Color(0xFFEF4444)
    val ColorStatusBadText = Color(0xFFF47C7C)
    val ColorStatusInfoBase = Color(0xFF7DD3FC)
    val ColorStatusInfoText = Color(0xFF7DD3FC)
    val ColorStatusLiveBase = Color(0xFFEF4444)
    val ColorStatusLiveText = Color(0xFFF47C7C)
}

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

/** Pure white with icy blue. */
object ArcticLightTokens {
    val ColorBgBase = Color(0xFFFFFFFF)
    val ColorBgSurface = Color(0xFFF8FAFC)
    val ColorBgSubtle = Color(0xFFF1F5F9)
    val ColorBgRaised = Color(0xFFFFFFFF)
    val ColorBgHover = Color(0xFFF1F5F9)
    val ColorBgInput = Color(0xFFF8FAFC)
    val ColorTextPrimary = Color(0xFF0F172A)
    val ColorTextSecondary = Color(0xFF334155)
    val ColorTextMuted = Color(0xFF657185)
    val ColorAccentBase = Color(0xFF0275B0)
    val ColorAccentLight = Color(0xFF23759A)
    val ColorAccentDark = Color(0xFF0284C7)
    val ColorAccentStrong = Color(0xFF0275B0)
    val ColorAccentOn = Color(0xFFFFFFFF)
    val ColorAccentOnStrong = Color(0xFFFFFFFF)
    val ColorAccentGlow = Color(0x590275B0)
    val ColorLineBase = Color(0xFFE2E8F0)
    val ColorLineStrong = Color(0xFFCBD5E1)
    val ColorStatusOkBase = Color(0xFF22C55E)
    val ColorStatusOkText = Color(0xFF167E3C)
    val ColorStatusWarnBase = Color(0xFFF59E0B)
    val ColorStatusWarnText = Color(0xFF986207)
    val ColorStatusBadBase = Color(0xFFEF4444)
    val ColorStatusBadText = Color(0xFFC93939)
    val ColorStatusInfoBase = Color(0xFF38BDF8)
    val ColorStatusInfoText = Color(0xFF23759A)
    val ColorStatusLiveBase = Color(0xFFEF4444)
    val ColorStatusLiveText = Color(0xFFC93939)
}

/** Material 3 roles: MaterialTheme(colorScheme = ArcticLightColorScheme) { … } */
val ArcticLightColorScheme: ColorScheme = lightColorScheme(
    primary = ArcticLightTokens.ColorAccentBase,
    onPrimary = ArcticLightTokens.ColorAccentOn,
    primaryContainer = ArcticLightTokens.ColorAccentStrong,
    onPrimaryContainer = ArcticLightTokens.ColorAccentOnStrong,
    secondary = ArcticLightTokens.ColorAccentLight,
    onSecondary = ArcticLightTokens.ColorAccentOn,
    tertiary = ArcticLightTokens.ColorStatusInfoBase,
    background = ArcticLightTokens.ColorBgBase,
    onBackground = ArcticLightTokens.ColorTextPrimary,
    surface = ArcticLightTokens.ColorBgRaised,
    onSurface = ArcticLightTokens.ColorTextPrimary,
    surfaceVariant = ArcticLightTokens.ColorBgSurface,
    onSurfaceVariant = ArcticLightTokens.ColorTextSecondary,
    outline = ArcticLightTokens.ColorLineStrong,
    outlineVariant = ArcticLightTokens.ColorLineBase,
    error = ArcticLightTokens.ColorStatusBadBase,
    onError = ArcticLightTokens.ColorAccentOnStrong,
    surfaceContainerLowest = ArcticLightTokens.ColorBgBase,
    surfaceContainerLow = ArcticLightTokens.ColorBgRaised,
    surfaceContainer = ArcticLightTokens.ColorBgRaised,
    surfaceContainerHigh = ArcticLightTokens.ColorBgSurface,
    surfaceContainerHighest = ArcticLightTokens.ColorBgSubtle,
    surfaceBright = ArcticLightTokens.ColorBgHover,
    surfaceDim = ArcticLightTokens.ColorBgBase,
    surfaceTint = ArcticLightTokens.ColorBgRaised,
    secondaryContainer = ArcticLightTokens.ColorBgHover,
    onSecondaryContainer = ArcticLightTokens.ColorAccentLight,
    inverseSurface = ArcticLightTokens.ColorTextPrimary,
    inverseOnSurface = ArcticLightTokens.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#0b1620#ffffffThe page behind everything
  • color.bg.surface#0f1e2b#f8fafcBands and side panels
  • color.bg.subtle#163040#f1f5f9Wells, tracks and quiet fills
  • color.bg.raised#122534#ffffffCards, rows and sheets
  • color.bg.hover#1a3a4c#f1f5f9A control under the pointer or finger
  • color.bg.input#0c1a26#f8fafcText fields
  • color.text.primary#eaf6ff#0f172aBody text and titles
  • color.text.secondary#9ec3d8#334155Supporting text
  • color.text.muted#81a5bb#657185Hints and meta lines
  • color.accent.base#22d3ee#0275b0Links, icons, focus rings
  • color.accent.light#a5f3fc#23759aThe accent a step lighter
  • color.accent.dark#0891b2#0284c7The accent a step darker
  • color.accent.strong#22d3ee#0275b0Filled buttons
  • color.accent.on#0b0d10#ffffffText on the accent
  • color.accent.onStrong#0b0d10#ffffffText on a filled button
  • color.accent.glowrgba(34,211,238,0.35)rgba(2,117,176,0.35)Glows and halos
  • color.line.base#1e3f52#e2e8f0Dividers and outlines
  • color.line.strong#2a5268#cbd5e1Outlines that must show
  • color.status.ok.base#34d399#22c55eSuccess fills
  • color.status.ok.text#34d399#167e3cSuccess text on any surface
  • color.status.warn.base#f59e0b#f59e0bWarning fills
  • color.status.warn.text#f59e0b#986207Warning text on any surface
  • color.status.bad.base#ef4444#ef4444Danger fills
  • color.status.bad.text#f47c7c#c93939Danger text on any surface
  • color.status.info.base#7dd3fc#38bdf8Information fills
  • color.status.info.text#7dd3fc#23759aInformation text on any surface
  • color.status.live.base#ef4444#ef4444LIVE badges
  • color.status.live.text#f47c7c#c93939LIVE 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