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.

Add it to your target and use FrostDarkTokens.colorAccentBase and the rest for colours, and OvScale.radiusMd, OvScale.spaceLg… for sizes; colorScheme says which half each one is.

// Frost (dark) — generated by openvibe-shared/tokens v1 from the OpenVibe theme "frost". Regenerate instead of editing.
import SwiftUI

/// Winter: frosted teal over a cold midnight sky. On by itself through December.
public enum FrostDarkTokens {
    public static let colorScheme: ColorScheme = .dark
    public static let colorBgBase = Color(.sRGB, red: 0.031, green: 0.067, blue: 0.106, opacity: 1)
    public static let colorBgSurface = Color(.sRGB, red: 0.051, green: 0.098, blue: 0.149, opacity: 1)
    public static let colorBgSubtle = Color(.sRGB, red: 0.075, green: 0.137, blue: 0.204, opacity: 1)
    public static let colorBgRaised = Color(.sRGB, red: 0.059, green: 0.11, blue: 0.169, opacity: 1)
    public static let colorBgHover = Color(.sRGB, red: 0.094, green: 0.161, blue: 0.239, opacity: 1)
    public static let colorBgInput = Color(.sRGB, red: 0.039, green: 0.082, blue: 0.125, opacity: 1)
    public static let colorTextPrimary = Color(.sRGB, red: 0.918, green: 0.957, blue: 0.984, opacity: 1)
    public static let colorTextSecondary = Color(.sRGB, red: 0.639, green: 0.725, blue: 0.8, opacity: 1)
    public static let colorTextMuted = Color(.sRGB, red: 0.498, green: 0.592, blue: 0.678, opacity: 1)
    public static let colorAccentBase = Color(.sRGB, red: 0.176, green: 0.831, blue: 0.749, opacity: 1)
    public static let colorAccentLight = Color(.sRGB, red: 0.494, green: 0.91, blue: 0.855, opacity: 1)
    public static let colorAccentDark = Color(.sRGB, red: 0.059, green: 0.62, blue: 0.549, opacity: 1)
    public static let colorAccentStrong = Color(.sRGB, red: 0.176, green: 0.831, blue: 0.749, opacity: 1)
    public static let colorAccentOn = Color(.sRGB, red: 0.043, green: 0.051, blue: 0.063, opacity: 1)
    public static let colorAccentOnStrong = Color(.sRGB, red: 0.043, green: 0.051, blue: 0.063, opacity: 1)
    public static let colorAccentGlow = Color(.sRGB, red: 0.176, green: 0.831, blue: 0.749, opacity: 0.35)
    public static let colorLineBase = Color(.sRGB, red: 0.106, green: 0.176, blue: 0.255, opacity: 1)
    public static let colorLineStrong = Color(.sRGB, red: 0.161, green: 0.251, blue: 0.341, opacity: 1)
    public static let colorStatusOkBase = Color(.sRGB, red: 0.29, green: 0.871, blue: 0.502, opacity: 1)
    public static let colorStatusOkText = Color(.sRGB, red: 0.29, green: 0.871, blue: 0.502, opacity: 1)
    public static let colorStatusWarnBase = Color(.sRGB, red: 0.984, green: 0.749, blue: 0.141, opacity: 1)
    public static let colorStatusWarnText = Color(.sRGB, red: 0.984, green: 0.749, blue: 0.141, opacity: 1)
    public static let colorStatusBadBase = Color(.sRGB, red: 0.973, green: 0.443, blue: 0.443, opacity: 1)
    public static let colorStatusBadText = Color(.sRGB, red: 0.973, green: 0.443, blue: 0.443, opacity: 1)
    public static let colorStatusInfoBase = Color(.sRGB, red: 0.576, green: 0.773, blue: 0.992, opacity: 1)
    public static let colorStatusInfoText = Color(.sRGB, red: 0.576, green: 0.773, blue: 0.992, opacity: 1)
    public static let colorStatusLiveBase = Color(.sRGB, red: 0.937, green: 0.267, blue: 0.267, opacity: 1)
    public static let colorStatusLiveText = Color(.sRGB, red: 0.945, green: 0.369, blue: 0.369, opacity: 1)
}

/// Winter in daylight: frosted teal on fresh snow. Frost's light half.
public enum FrostLightTokens {
    public static let colorScheme: ColorScheme = .light
    public static let colorBgBase = Color(.sRGB, red: 0.949, green: 0.973, blue: 0.984, opacity: 1)
    public static let colorBgSurface = Color(.sRGB, red: 0.91, green: 0.949, blue: 0.969, opacity: 1)
    public static let colorBgSubtle = Color(.sRGB, red: 0.859, green: 0.918, blue: 0.945, opacity: 1)
    public static let colorBgRaised = Color(.sRGB, red: 0.973, green: 0.984, blue: 0.992, opacity: 1)
    public static let colorBgHover = Color(.sRGB, red: 0.882, green: 0.933, blue: 0.957, opacity: 1)
    public static let colorBgInput = Color(.sRGB, red: 0.929, green: 0.961, blue: 0.976, opacity: 1)
    public static let colorTextPrimary = Color(.sRGB, red: 0.055, green: 0.114, blue: 0.149, opacity: 1)
    public static let colorTextSecondary = Color(.sRGB, red: 0.231, green: 0.322, blue: 0.376, opacity: 1)
    public static let colorTextMuted = Color(.sRGB, red: 0.322, green: 0.412, blue: 0.463, opacity: 1)
    public static let colorAccentBase = Color(.sRGB, red: 0.059, green: 0.455, blue: 0.424, opacity: 1)
    public static let colorAccentLight = Color(.sRGB, red: 0.047, green: 0.447, blue: 0.404, opacity: 1)
    public static let colorAccentDark = Color(.sRGB, red: 0.067, green: 0.369, blue: 0.349, opacity: 1)
    public static let colorAccentStrong = Color(.sRGB, red: 0.059, green: 0.455, blue: 0.424, opacity: 1)
    public static let colorAccentOn = Color(.sRGB, red: 1, green: 1, blue: 1, opacity: 1)
    public static let colorAccentOnStrong = Color(.sRGB, red: 1, green: 1, blue: 1, opacity: 1)
    public static let colorAccentGlow = Color(.sRGB, red: 0.059, green: 0.455, blue: 0.424, opacity: 0.35)
    public static let colorLineBase = Color(.sRGB, red: 0.812, green: 0.886, blue: 0.918, opacity: 1)
    public static let colorLineStrong = Color(.sRGB, red: 0.737, green: 0.835, blue: 0.875, opacity: 1)
    public static let colorStatusOkBase = Color(.sRGB, red: 0.133, green: 0.773, blue: 0.369, opacity: 1)
    public static let colorStatusOkText = Color(.sRGB, red: 0.078, green: 0.463, blue: 0.22, opacity: 1)
    public static let colorStatusWarnBase = Color(.sRGB, red: 0.961, green: 0.62, blue: 0.043, opacity: 1)
    public static let colorStatusWarnText = Color(.sRGB, red: 0.557, green: 0.361, blue: 0.024, opacity: 1)
    public static let colorStatusBadBase = Color(.sRGB, red: 0.937, green: 0.267, blue: 0.267, opacity: 1)
    public static let colorStatusBadText = Color(.sRGB, red: 0.729, green: 0.208, blue: 0.208, opacity: 1)
    public static let colorStatusInfoBase = Color(.sRGB, red: 0.22, green: 0.741, blue: 0.973, opacity: 1)
    public static let colorStatusInfoText = Color(.sRGB, red: 0.125, green: 0.431, blue: 0.565, opacity: 1)
    public static let colorStatusLiveBase = Color(.sRGB, red: 0.937, green: 0.267, blue: 0.267, opacity: 1)
    public static let colorStatusLiveText = Color(.sRGB, red: 0.729, green: 0.208, blue: 0.208, opacity: 1)
}

/// The OpenVibe kit's radius, space, size, type and motion scales: the same in every theme.
public enum OvScale {
    public static let radiusSm: CGFloat = 10
    public static let radiusMd: CGFloat = 14
    public static let radiusLg: CGFloat = 20
    public static let radiusPill: CGFloat = 999
    public static let spaceXs: CGFloat = 4
    public static let spaceSm: CGFloat = 8
    public static let spaceMd: CGFloat = 12
    public static let spaceLg: CGFloat = 16
    public static let spaceXl: CGFloat = 24
    public static let spaceXxl: CGFloat = 32
    public static let sizeTap: CGFloat = 44
    public static let sizeIcon: CGFloat = 20
    public static let sizeAvatar: CGFloat = 34
    public static let typeSizeCaption: CGFloat = 12
    public static let typeSizeMeta: CGFloat = 13
    public static let typeSizeBody: CGFloat = 15
    public static let typeSizeLead: CGFloat = 17
    public static let typeSizeTitle: CGFloat = 20
    public static let typeSizeHeadline: CGFloat = 24
    public static let typeSizeDisplay: CGFloat = 34
    public static let motionDurationFast: Double = 0.18
    public static let motionDurationBase: Double = 0.26
    public static let motionDurationSlow: Double = 0.36
    public static let motionDurationReduced: Double = 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#08111b#f2f8fbThe page behind everything
  • color.bg.surface#0d1926#e8f2f7Bands and side panels
  • color.bg.subtle#132334#dbeaf1Wells, tracks and quiet fills
  • color.bg.raised#0f1c2b#f8fbfdCards, rows and sheets
  • color.bg.hover#18293d#e1eef4A control under the pointer or finger
  • color.bg.input#0a1520#edf5f9Text fields
  • color.text.primary#eaf4fb#0e1d26Body text and titles
  • color.text.secondary#a3b9cc#3b5260Supporting text
  • color.text.muted#7f97ad#526976Hints and meta lines
  • color.accent.base#2dd4bf#0f746cLinks, icons, focus rings
  • color.accent.light#7ee8da#0c7267The accent a step lighter
  • color.accent.dark#0f9e8c#115e59The accent a step darker
  • color.accent.strong#2dd4bf#0f746cFilled buttons
  • color.accent.on#0b0d10#ffffffText on the accent
  • color.accent.onStrong#0b0d10#ffffffText on a filled button
  • color.accent.glowrgba(45,212,191,0.35)rgba(15,116,108,0.35)Glows and halos
  • color.line.base#1b2d41#cfe2eaDividers and outlines
  • color.line.strong#294057#bcd5dfOutlines that must show
  • color.status.ok.base#4ade80#22c55eSuccess fills
  • color.status.ok.text#4ade80#147638Success text on any surface
  • color.status.warn.base#fbbf24#f59e0bWarning fills
  • color.status.warn.text#fbbf24#8e5c06Warning text on any surface
  • color.status.bad.base#f87171#ef4444Danger fills
  • color.status.bad.text#f87171#ba3535Danger text on any surface
  • color.status.info.base#93c5fd#38bdf8Information fills
  • color.status.info.text#93c5fd#206e90Information text on any surface
  • color.status.live.base#ef4444#ef4444LIVE badges
  • color.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.

Change this theme in the studio The tokens API