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

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

/// Warm retro contrast.
public enum GruvboxDarkTokens {
    public static let colorScheme: ColorScheme = .dark
    public static let colorBgBase = Color(.sRGB, red: 0.114, green: 0.125, blue: 0.129, opacity: 1)
    public static let colorBgSurface = Color(.sRGB, red: 0.157, green: 0.157, blue: 0.157, opacity: 1)
    public static let colorBgSubtle = Color(.sRGB, red: 0.235, green: 0.22, blue: 0.212, opacity: 1)
    public static let colorBgRaised = Color(.sRGB, red: 0.196, green: 0.188, blue: 0.184, opacity: 1)
    public static let colorBgHover = Color(.sRGB, red: 0.314, green: 0.286, blue: 0.271, opacity: 1)
    public static let colorBgInput = Color(.sRGB, red: 0.141, green: 0.141, blue: 0.141, opacity: 1)
    public static let colorTextPrimary = Color(.sRGB, red: 0.922, green: 0.859, blue: 0.698, opacity: 1)
    public static let colorTextSecondary = Color(.sRGB, red: 0.835, green: 0.769, blue: 0.631, opacity: 1)
    public static let colorTextMuted = Color(.sRGB, red: 0.761, green: 0.722, blue: 0.667, opacity: 1)
    public static let colorAccentBase = Color(.sRGB, red: 0.98, green: 0.741, blue: 0.184, opacity: 1)
    public static let colorAccentLight = Color(.sRGB, red: 0.988, green: 0.898, blue: 0.4, opacity: 1)
    public static let colorAccentDark = Color(.sRGB, red: 0.843, green: 0.6, blue: 0.129, opacity: 1)
    public static let colorAccentStrong = Color(.sRGB, red: 0.98, green: 0.741, blue: 0.184, 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.98, green: 0.741, blue: 0.184, opacity: 0.35)
    public static let colorLineBase = Color(.sRGB, red: 0.235, green: 0.22, blue: 0.212, opacity: 1)
    public static let colorLineStrong = Color(.sRGB, red: 0.314, green: 0.286, blue: 0.271, opacity: 1)
    public static let colorStatusOkBase = Color(.sRGB, red: 0.722, green: 0.733, blue: 0.149, opacity: 1)
    public static let colorStatusOkText = Color(.sRGB, red: 0.745, green: 0.753, blue: 0.216, opacity: 1)
    public static let colorStatusWarnBase = Color(.sRGB, red: 0.996, green: 0.502, blue: 0.098, opacity: 1)
    public static let colorStatusWarnText = Color(.sRGB, red: 0.996, green: 0.651, blue: 0.369, opacity: 1)
    public static let colorStatusBadBase = Color(.sRGB, red: 0.984, green: 0.286, blue: 0.204, opacity: 1)
    public static let colorStatusBadText = Color(.sRGB, red: 0.992, green: 0.643, blue: 0.604, opacity: 1)
    public static let colorStatusInfoBase = Color(.sRGB, red: 0.514, green: 0.647, blue: 0.596, opacity: 1)
    public static let colorStatusInfoText = Color(.sRGB, red: 0.659, green: 0.753, blue: 0.718, 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.969, green: 0.647, blue: 0.647, opacity: 1)
}

/// Cream with bold retro accents.
public enum GruvboxLightTokens {
    public static let colorScheme: ColorScheme = .light
    public static let colorBgBase = Color(.sRGB, red: 0.984, green: 0.945, blue: 0.78, opacity: 1)
    public static let colorBgSurface = Color(.sRGB, red: 0.949, green: 0.898, blue: 0.737, opacity: 1)
    public static let colorBgSubtle = Color(.sRGB, red: 0.922, green: 0.859, blue: 0.698, opacity: 1)
    public static let colorBgRaised = Color(.sRGB, red: 0.984, green: 0.945, blue: 0.78, opacity: 1)
    public static let colorBgHover = Color(.sRGB, red: 0.949, green: 0.898, blue: 0.737, opacity: 1)
    public static let colorBgInput = Color(.sRGB, red: 0.961, green: 0.925, blue: 0.769, opacity: 1)
    public static let colorTextPrimary = Color(.sRGB, red: 0.235, green: 0.22, blue: 0.212, opacity: 1)
    public static let colorTextSecondary = Color(.sRGB, red: 0.314, green: 0.286, blue: 0.271, opacity: 1)
    public static let colorTextMuted = Color(.sRGB, red: 0.408, green: 0.369, blue: 0.329, opacity: 1)
    public static let colorAccentBase = Color(.sRGB, red: 0.655, green: 0.243, blue: 0.024, opacity: 1)
    public static let colorAccentLight = Color(.sRGB, red: 0.576, green: 0.29, blue: 0.055, opacity: 1)
    public static let colorAccentDark = Color(.sRGB, red: 0.686, green: 0.227, blue: 0.012, opacity: 1)
    public static let colorAccentStrong = Color(.sRGB, red: 0.655, green: 0.243, blue: 0.024, 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.655, green: 0.243, blue: 0.024, opacity: 0.35)
    public static let colorLineBase = Color(.sRGB, red: 0.835, green: 0.769, blue: 0.631, opacity: 1)
    public static let colorLineStrong = Color(.sRGB, red: 0.741, green: 0.682, blue: 0.576, opacity: 1)
    public static let colorStatusOkBase = Color(.sRGB, red: 0.596, green: 0.592, blue: 0.102, opacity: 1)
    public static let colorStatusOkText = Color(.sRGB, red: 0.392, green: 0.392, blue: 0.067, opacity: 1)
    public static let colorStatusWarnBase = Color(.sRGB, red: 0.843, green: 0.6, blue: 0.129, opacity: 1)
    public static let colorStatusWarnText = Color(.sRGB, red: 0.49, green: 0.349, blue: 0.075, opacity: 1)
    public static let colorStatusBadBase = Color(.sRGB, red: 0.8, green: 0.141, blue: 0.114, opacity: 1)
    public static let colorStatusBadText = Color(.sRGB, red: 0.737, green: 0.129, blue: 0.106, opacity: 1)
    public static let colorStatusInfoBase = Color(.sRGB, red: 0.271, green: 0.522, blue: 0.533, opacity: 1)
    public static let colorStatusInfoText = Color(.sRGB, red: 0.212, green: 0.408, blue: 0.416, 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.694, green: 0.196, blue: 0.196, 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#1d2021#fbf1c7The page behind everything
  • color.bg.surface#282828#f2e5bcBands and side panels
  • color.bg.subtle#3c3836#ebdbb2Wells, tracks and quiet fills
  • color.bg.raised#32302f#fbf1c7Cards, rows and sheets
  • color.bg.hover#504945#f2e5bcA control under the pointer or finger
  • color.bg.input#242424#f5ecc4Text fields
  • color.text.primary#ebdbb2#3c3836Body text and titles
  • color.text.secondary#d5c4a1#504945Supporting text
  • color.text.muted#c2b8aa#685e54Hints and meta lines
  • color.accent.base#fabd2f#a73e06Links, icons, focus rings
  • color.accent.light#fce566#934a0eThe accent a step lighter
  • color.accent.dark#d79921#af3a03The accent a step darker
  • color.accent.strong#fabd2f#a73e06Filled buttons
  • color.accent.on#0b0d10#ffffffText on the accent
  • color.accent.onStrong#0b0d10#ffffffText on a filled button
  • color.accent.glowrgba(250,189,47,0.35)rgba(167,62,6,0.35)Glows and halos
  • color.line.base#3c3836#d5c4a1Dividers and outlines
  • color.line.strong#504945#bdae93Outlines that must show
  • color.status.ok.base#b8bb26#98971aSuccess fills
  • color.status.ok.text#bec037#646411Success text on any surface
  • color.status.warn.base#fe8019#d79921Warning fills
  • color.status.warn.text#fea65e#7d5913Warning text on any surface
  • color.status.bad.base#fb4934#cc241dDanger fills
  • color.status.bad.text#fda49a#bc211bDanger text on any surface
  • color.status.info.base#83a598#458588Information fills
  • color.status.info.text#a8c0b7#36686aInformation text on any surface
  • color.status.live.base#ef4444#ef4444LIVE badges
  • color.status.live.text#f7a5a5#b13232LIVE 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