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 CatppuccinMochaDarkTokens.colorAccentBase and the rest for colours, and OvScale.radiusMd, OvScale.spaceLg… for sizes; colorScheme says which half each one is.

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

/// Soothing pastels on mocha.
public enum CatppuccinMochaDarkTokens {
    public static let colorScheme: ColorScheme = .dark
    public static let colorBgBase = Color(.sRGB, red: 0.118, green: 0.118, blue: 0.18, opacity: 1)
    public static let colorBgSurface = Color(.sRGB, red: 0.094, green: 0.094, blue: 0.145, opacity: 1)
    public static let colorBgSubtle = Color(.sRGB, red: 0.192, green: 0.196, blue: 0.267, opacity: 1)
    public static let colorBgRaised = Color(.sRGB, red: 0.118, green: 0.118, blue: 0.18, opacity: 1)
    public static let colorBgHover = Color(.sRGB, red: 0.192, green: 0.196, blue: 0.267, opacity: 1)
    public static let colorBgInput = Color(.sRGB, red: 0.102, green: 0.102, blue: 0.173, opacity: 1)
    public static let colorTextPrimary = Color(.sRGB, red: 0.804, green: 0.839, blue: 0.957, opacity: 1)
    public static let colorTextSecondary = Color(.sRGB, red: 0.729, green: 0.761, blue: 0.871, opacity: 1)
    public static let colorTextMuted = Color(.sRGB, red: 0.596, green: 0.612, blue: 0.686, opacity: 1)
    public static let colorAccentBase = Color(.sRGB, red: 0.796, green: 0.651, blue: 0.969, opacity: 1)
    public static let colorAccentLight = Color(.sRGB, red: 0.863, green: 0.753, blue: 1, opacity: 1)
    public static let colorAccentDark = Color(.sRGB, red: 0.69, green: 0.49, blue: 0.878, opacity: 1)
    public static let colorAccentStrong = Color(.sRGB, red: 0.796, green: 0.651, blue: 0.969, 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.796, green: 0.651, blue: 0.969, opacity: 0.35)
    public static let colorLineBase = Color(.sRGB, red: 0.192, green: 0.196, blue: 0.267, opacity: 1)
    public static let colorLineStrong = Color(.sRGB, red: 0.271, green: 0.278, blue: 0.353, opacity: 1)
    public static let colorStatusOkBase = Color(.sRGB, red: 0.651, green: 0.89, blue: 0.631, opacity: 1)
    public static let colorStatusOkText = Color(.sRGB, red: 0.651, green: 0.89, blue: 0.631, opacity: 1)
    public static let colorStatusWarnBase = Color(.sRGB, red: 0.98, green: 0.702, blue: 0.529, opacity: 1)
    public static let colorStatusWarnText = Color(.sRGB, red: 0.98, green: 0.702, blue: 0.529, opacity: 1)
    public static let colorStatusBadBase = Color(.sRGB, red: 0.953, green: 0.545, blue: 0.659, opacity: 1)
    public static let colorStatusBadText = Color(.sRGB, red: 0.953, green: 0.545, blue: 0.659, opacity: 1)
    public static let colorStatusInfoBase = Color(.sRGB, red: 0.537, green: 0.706, blue: 0.98, opacity: 1)
    public static let colorStatusInfoText = Color(.sRGB, red: 0.537, green: 0.706, blue: 0.98, opacity: 1)
    public static let colorStatusLiveBase = Color(.sRGB, red: 0.953, green: 0.545, blue: 0.659, opacity: 1)
    public static let colorStatusLiveText = Color(.sRGB, red: 0.953, green: 0.545, blue: 0.659, opacity: 1)
}

/// Soothing pastels on latte.
public enum CatppuccinMochaLightTokens {
    public static let colorScheme: ColorScheme = .light
    public static let colorBgBase = Color(.sRGB, red: 0.937, green: 0.945, blue: 0.961, opacity: 1)
    public static let colorBgSurface = Color(.sRGB, red: 0.902, green: 0.914, blue: 0.937, opacity: 1)
    public static let colorBgSubtle = Color(.sRGB, red: 0.863, green: 0.878, blue: 0.91, opacity: 1)
    public static let colorBgRaised = Color(.sRGB, red: 0.937, green: 0.945, blue: 0.961, opacity: 1)
    public static let colorBgHover = Color(.sRGB, red: 0.863, green: 0.878, blue: 0.91, opacity: 1)
    public static let colorBgInput = Color(.sRGB, red: 0.91, green: 0.922, blue: 0.941, opacity: 1)
    public static let colorTextPrimary = Color(.sRGB, red: 0.298, green: 0.31, blue: 0.412, opacity: 1)
    public static let colorTextSecondary = Color(.sRGB, red: 0.361, green: 0.373, blue: 0.467, opacity: 1)
    public static let colorTextMuted = Color(.sRGB, red: 0.373, green: 0.38, blue: 0.463, opacity: 1)
    public static let colorAccentBase = Color(.sRGB, red: 0.49, green: 0.204, blue: 0.863, opacity: 1)
    public static let colorAccentLight = Color(.sRGB, red: 0.478, green: 0.275, blue: 0.761, opacity: 1)
    public static let colorAccentDark = Color(.sRGB, red: 0.439, green: 0.157, blue: 0.831, opacity: 1)
    public static let colorAccentStrong = Color(.sRGB, red: 0.49, green: 0.204, blue: 0.863, 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.49, green: 0.204, blue: 0.863, opacity: 0.35)
    public static let colorLineBase = Color(.sRGB, red: 0.8, green: 0.816, blue: 0.855, opacity: 1)
    public static let colorLineStrong = Color(.sRGB, red: 0.737, green: 0.753, blue: 0.8, opacity: 1)
    public static let colorStatusOkBase = Color(.sRGB, red: 0.251, green: 0.627, blue: 0.169, opacity: 1)
    public static let colorStatusOkText = Color(.sRGB, red: 0.176, green: 0.439, blue: 0.118, opacity: 1)
    public static let colorStatusWarnBase = Color(.sRGB, red: 0.996, green: 0.392, blue: 0.043, opacity: 1)
    public static let colorStatusWarnText = Color(.sRGB, red: 0.659, green: 0.259, blue: 0.027, opacity: 1)
    public static let colorStatusBadBase = Color(.sRGB, red: 0.824, green: 0.059, blue: 0.224, opacity: 1)
    public static let colorStatusBadText = Color(.sRGB, red: 0.773, green: 0.055, blue: 0.212, opacity: 1)
    public static let colorStatusInfoBase = Color(.sRGB, red: 0.118, green: 0.4, blue: 0.961, opacity: 1)
    public static let colorStatusInfoText = Color(.sRGB, red: 0.102, green: 0.353, blue: 0.847, opacity: 1)
    public static let colorStatusLiveBase = Color(.sRGB, red: 0.824, green: 0.059, blue: 0.224, opacity: 1)
    public static let colorStatusLiveText = Color(.sRGB, red: 0.773, green: 0.055, blue: 0.212, 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#1e1e2e#eff1f5The page behind everything
  • color.bg.surface#181825#e6e9efBands and side panels
  • color.bg.subtle#313244#dce0e8Wells, tracks and quiet fills
  • color.bg.raised#1e1e2e#eff1f5Cards, rows and sheets
  • color.bg.hover#313244#dce0e8A control under the pointer or finger
  • color.bg.input#1a1a2c#e8ebf0Text fields
  • color.text.primary#cdd6f4#4c4f69Body text and titles
  • color.text.secondary#bac2de#5c5f77Supporting text
  • color.text.muted#989caf#5f6176Hints and meta lines
  • color.accent.base#cba6f7#7d34dcLinks, icons, focus rings
  • color.accent.light#dcc0ff#7a46c2The accent a step lighter
  • color.accent.dark#b07de0#7028d4The accent a step darker
  • color.accent.strong#cba6f7#7d34dcFilled buttons
  • color.accent.on#0b0d10#ffffffText on the accent
  • color.accent.onStrong#0b0d10#ffffffText on a filled button
  • color.accent.glowrgba(203,166,247,0.35)rgba(125,52,220,0.35)Glows and halos
  • color.line.base#313244#ccd0daDividers and outlines
  • color.line.strong#45475a#bcc0ccOutlines that must show
  • color.status.ok.base#a6e3a1#40a02bSuccess fills
  • color.status.ok.text#a6e3a1#2d701eSuccess text on any surface
  • color.status.warn.base#fab387#fe640bWarning fills
  • color.status.warn.text#fab387#a84207Warning text on any surface
  • color.status.bad.base#f38ba8#d20f39Danger fills
  • color.status.bad.text#f38ba8#c50e36Danger text on any surface
  • color.status.info.base#89b4fa#1e66f5Information fills
  • color.status.info.text#89b4fa#1a5ad8Information text on any surface
  • color.status.live.base#f38ba8#d20f39LIVE badges
  • color.status.live.text#f38ba8#c50e36LIVE 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