Cargando

Cargando...

Skip to content
CubicLauncherDocs

Theme token reference

Complete list of CSS variables a CubicLauncher theme can override, with their purpose and default value, plus the available icon names.

This page is the technical reference for the theme system. Each token is a CSS variable: it is declared in Definition.toml (in the corresponding section or in [tokens]) and the launcher applies it to the interface.

For the complete workflow, see Creating a theme.

Resolution orderedit

Values are applied in this order; the last one wins:

  1. Launcher defaults (:root).
  2. Theme variables (Meta.toml + Definition.toml).
  3. Theme background image and fonts.
  4. Inject.css, in the cubic.theme layer or without a layer depending on [inject].layer.
  5. Layout.css, always without a layer and last.

The launcher's global styles live in the cubic layer; each component's styles do not use layers. That is why Inject.css can override variables and global styles without problems, but to beat a component it needs layer = "unlayered".

How to declare a tokenedit

toml
[colors]
accent = "#97C459"          # --accent

[text]
primary = "#E0ECD4"         # --text-primary

[tokens]
"--bg-image-blur" = "12px"  # literal variable

Values are copied to CSS as-is. A numeric token without a unit (for example "12") produces an invalid value for the browser and the declaration is discarded.

Surfaces and backgroundsedit

TokenControlsDefault
--bg-mainBase window background#0a0a0a
--bg-sidebarSidebar background#111113
--bg-cardCard and panel background#111113
--bg-inputText field background#0a0a0a
--bg-item-activeSelected item background#18181a
--bg-overlayVeil over the interfacergba(0, 0, 0, 0.7)
--bg-surfaceAlias of --bg-item-activevar(--bg-item-active)
--bg-sidebar-gradientSidebar gradientlinear-gradient(180deg, …)
--bg-card-gradientCard gradientlinear-gradient(135deg, …)
--surface-rgbBase triplet for translucent surfaces255, 255, 255
--surface-hoverSurface on hoverrgba(var(--surface-rgb), 0.06)
--surface-activePressed surfacergba(var(--surface-rgb), 0.08)
--surface-selectedSelected surfacergba(var(--surface-rgb), 0.03)
--surface-cardCard fillrgba(var(--surface-rgb), 0.03)
--surface-inputField fillrgba(var(--surface-rgb), 0.03)
--surface-subtleBarely visible surfacergba(var(--surface-rgb), 0.02)
--surface-raisedRaised surfacergba(var(--surface-rgb), 0.04)
--surface-dropdownDropdown backgroundvar(--bg-card)
--toast-bgNotification backgroundcolor-mix(…)
--toast-borderNotification borderrgba(var(--surface-rgb), 0.06)

Textedit

TokenControlsDefault
--text-primaryMain text#f4f4f5
--text-secondarySecondary text#a1a1aa
--text-mutedDisabled text#71717a
--text-tertiaryAuxiliary text#71717a

Accentedit

TokenControlsDefault
--accentBrand color#ffffff
--accent-rgbThe accent as R, G, B255, 255, 255
--accent-hoverAccent on hover#f4f4f5
--accent-textText on the accent#0a0a0a
--accent-primaryAlias of --accentvar(--accent)
Keep the triplet in sync

--accent-rgb is not calculated automatically. If you change --accent and forget --accent-rgb, glows, borders and backgrounds that use rgba(var(--accent-rgb), α) keep the previous color.

Borders and radiiedit

TokenControlsDefault
--border-colorBorder colorrgba(var(--surface-rgb), 0.06)
--borderAlias of --border-colorvar(--border-color)
--border-widthBorder thickness1px
--border-hoverBorder on hoverrgba(var(--surface-rgb), 0.1)
--border-focusFocus borderrgba(var(--surface-rgb), 0.3)
--border-radiusGlobal radius4px
--border-radius-smSmall radius3px
--border-radius-lgLarge radiuscalc(var(--border-radius) * 2)
--border-radius-pillPill radius999px

Shadowsedit

TokenControlsDefault
--shadow-smSubtle shadow0 1px 3px rgba(0, 0, 0, 0.5)
--shadow-mdMedium shadow0 4px 12px rgba(0, 0, 0, 0.5)
--shadow-lgLarge shadow0 8px 28px rgba(0, 0, 0, 0.6)
--shadow-insetInner shadowinset 0 1px 2px rgba(0, 0, 0, 0.2)
--shadow-floatingFloating elementsvar(--shadow-lg)
--shadow-imageImagesvar(--shadow-md)
--shadow-indicatorIndicatorsvar(--shadow-sm)
--shadow-drawer-leftLeft drawer-8px 0 32px rgba(0, 0, 0, 0.6)
--shadow-drawer-rightRight drawer8px 0 32px rgba(0, 0, 0, 0.6)
--shadow-drawer-topTop drawer0 -8px 32px rgba(0, 0, 0, 0.6)
--shadow-drawer-bottomBottom drawer0 8px 32px rgba(0, 0, 0, 0.6)

Typographyedit

TokenControlsDefault
--font-familyInterface typography"Cantarell", system-ui, sans-serif
--font-family-monoMonospaced typographyui-monospace, …
--font-size-baseBase size14px
--font-size-smSmall size0.8rem
--font-size-lgLarge size1.2rem
--font-size-controlControl text0.85rem
--font-size-labelLabels0.65rem
--font-weight-normalNormal weight400
--font-weight-mediumMedium weight600
--font-weight-boldBold weight700
--line-heightLine height1.5

Spacing, controls and motionedit

TokenControlsDefault
--space-xsExtra-small space4px
--space-smSmall space8px
--space-mdMedium space12px
--space-lgLarge space16px
--space-xlExtra-large space24px
--control-paddingControl padding10px 12px
--button-paddingButton padding8px 16px
--icon-scaleGlobal icon scale1
--transition-fastFast transition0.15s
--transition-normalNormal transition0.2s
TokenControlsDefault
--sidebar-widthSidebar width260px
--sidebar-compact-widthWidth in compact mode70px
--sidebar-row-heightRow height52px
--sidebar-compact-row-heightCompact row height50px
--sidebar-row-gapGap between rows8px
--version-row-heightVersion row height78px
--resource-row-heightResource row height130px
--resource-row-gapGap between resources6px
--resource-card-paddingResource card padding14px 16px
--resource-icon-sizeResource icon size56px

Content marketplaceedit

TokenControlsDefault
--market-row-heightRow height224px
--market-grid-gapGrid gap12px
--market-card-min-widthMinimum card width280px
--market-grid-paddingGrid padding8px
--market-card-paddingCard padding14px
--market-icon-sizeIcon size48px
--market-item-gapGap between items10px
--market-title-sizeTitle size0.9rem
--market-description-sizeDescription size0.75rem
--market-button-paddingButton padding5px 12px
--market-installed-row-heightInstalled row height84px
--market-installed-row-gapGap between installed items6px
--market-installed-icon-sizeInstalled icon40px
--market-installed-paddingInstalled item padding8px 12px
--market-detail-icon-sizeDetail icon80px
--market-detail-sidebar-widthDetail sidebar270px
--market-page-paddingPage padding24px
--market-page-padding-compactPadding in a narrow window14px

The marketplace derives its colors from the theme through aliases. You do not need to redefine them: if you change --accent and --bg-card, the marketplace follows.

AliasDerives from
--market-card-bg, --market-panel-bg, --market-input-bg--bg-card, --bg-sidebar, --bg-input
--market-accent, --market-accent-hover, --market-accent-text--accent, --accent-hover, --accent-text
--market-border, --market-border-hover, --market-card-radius--border, --border-radius
--market-success, --market-error, --market-warning, --market-info--color-success, --color-error, --color-warning, --color-info
--market-text-secondary--text-secondary

States and semantic colorsedit

TokenControlsDefault
--color-successSuccess#22c55e
--color-success-rgbSuccess as R, G, B34, 197, 94
--color-errorError#ef4444
--color-error-rgbError as R, G, B239, 68, 68
--color-warningWarning#eab308
--color-warning-rgbWarning as R, G, B234, 179, 8
--color-infoInformation#60a5fa
--color-info-rgbInformation as R, G, B96, 165, 250
--color-on-successText on success#fff
--color-on-errorText on error#fff
--color-on-warningText on warning#fff
--color-on-infoText on information#fff
--color-status-startingInstance startingvar(--color-info)
--color-status-startedInstance startedvar(--color-success)
--errorAlias of errorvar(--color-error)
--warningAlias of warningvar(--color-warning)
--glow-errorError glow0 0 12px rgba(…)
--glow-successSuccess glow0 0 12px rgba(…)

Downloadsedit

TokenControlsDefault
--download-libraryLibraries#4ade80
--download-assetAssets#60a5fa
--download-nativeNative libraries#f59e0b
--download-clientClient#a78bfa
--download-verifyingVerification#f472b6
--download-genericGeneric#94a3b8
--download-processingProcessing#fb923c
--download-jreJava#22d3ee

Console and logsedit

TokenControlsDefault
--log-traceTrace levelvar(--text-muted)
--log-debugDebug levelvar(--text-muted)
--log-infoInfo levelvar(--text-primary)
--log-messageMinecraft messagesvar(--text-primary)
--log-warnWarn levelvar(--color-warning)
--log-errorError levelvar(--color-error)
--log-fatalFatal levelvar(--color-error)
--log-launcherLauncher messagesvar(--text-primary)
--log-stderrError outputvar(--color-error)
--log-unknownUnknown levelvar(--text-tertiary)
--log-font-sizeFont size0.75rem
--log-line-heightLine heightvar(--line-height)
--log-line-paddingLine padding2px 14px
--log-line-min-heightMinimum line height22px

Scrollbaredit

TokenControlsDefault
--scrollbar-thumbThumbrgba(var(--surface-rgb), 0.12)
--scrollbar-thumb-hoverThumb on hovervar(--text-secondary)
--scrollbar-trackTrackvar(--bg-main)
--scrollbar-sizeThickness6px
--scrollbar-radiusRadius10px

Background imageedit

TokenControlsDefault
--bg-image-blurBlur (with unit)8px
--bg-image-opacityOpacity (0–1)0.3
--bg-image-sizeFramingcover
--bg-image-positionPositioncenter
--bg-image-brightnessBrightness0.4

[background] writes these variables automatically. image_blur, image_opacity, mode, position and brightness are numbers or unitless strings; the launcher adds px only to the blur. If you prefer full control, declare the variable in [tokens] with the unit included.

Backdrop blursedit

They are declared in [backdrop] as numbers and the launcher adds px.

TokenControlsDefault
--backdrop-blur-overlayOverlaid veil4px
--backdrop-blur-modalModals4px
--backdrop-blur-dropdownDropdowns4px
--backdrop-blur-panelPanels2px
--backdrop-blur-floatFloating elements4px
--backdrop-blur-viewerImage viewer2px

Overlays and viewersedit

TokenControlsDefault
--media-overlayVeil over imagesrgba(0, 0, 0, 0.6)
--media-overlay-textText over images#fff
--media-overlay-borderBorder over imagesrgba(255, 255, 255, 0.1)
--viewer-overlayViewer backgroundrgba(0, 0, 0, 0.9)
--tutorial-overlayTutorial veilrgba(0, 0, 0, 0.5)
--tutorial-overlay-softSoft tutorial veilrgba(0, 0, 0, 0.15)

Mod loadersedit

TokenControlsDefault
--clr-loader-vanillaVanilla#78909c
--clr-loader-fabricFabric#66bb6a
--clr-loader-forgeForge#ffa726
--clr-loader-quiltQuilt#ab47bc

Miscellaneousedit

TokenControlsDefault
--icon-filterCSS filter for raster icons in some controlsinvert(1)
--color-schemeNative scheme (dark, light): system scrollbars and controlsnormal
Internal variables

--bg-image-loaded and --font-loaded are written by the launcher to coordinate entrance animations. Do not declare them in a theme: they are overwritten when the theme is applied and the result is unpredictable.

Iconsedit

A theme can replace icons by declaring keys in the group:name format in [icons.group]. These are the names the interface uses:

GroupNames
uibell, interface, check, check-circle, chevron-down, chevron-left, chevron-right, close, copy, download, error, flag, lock, logout, performance, pin, play, refresh, resources, search, shaders, spinner, success, trash, unlock, upload
navcreate, edit, pencil, settings, sliders
instancebox, check-square, clock, code, database, external-link, folder, grid, image, market, multiplayer, puzzle, resources, screenshots, servers, shader, terminal, worlds
logarrow-down, chevron-down, chevron-up, clear, copy, logs, scroll-down, search, spinner, upload
brandcubic, curseforge, discord, fabric, forge, github, microsoft, modrinth, neoforged, optifine, quilt, vanilla

brand:curseforge, brand:fabric, brand:forge, brand:modrinth, brand:neoforged, brand:optifine and brand:vanilla are raster images in the original launcher; when replacing them, it is best to use PNG with a transparent background.

In addition to the groups, [icons] preview defines the theme image in the selector.

Minimum contrastedit

For a theme to be readable on any screen:

  • Main text on the main background: 4.5:1 minimum.
  • Secondary text and labels: 3:1 minimum.
  • Borders and separators: 1.5:1 relative to the surface.
  • Text on --accent: use --accent-text, not --text-primary.