For community sites and tools

Community Brand Kit

Building a fan site, a calculator or a script library? Use the same colors, type and components as the official website and wiki. One stylesheet, free under the MIT License.

  • v1.1.0
  • MIT license
  • 23.9 KB, 5.0 KB gzipped
  • Dark and light
What you get
Laboratory resources2.159E62

Design tokens for two themes, the 12 facility colors from the game, and 16 components. No logos, symbol or key art: those stay ours.

Install

Three steps, then the footer line

The kit is plain CSS. It works in static pages, React, Vue, Svelte or a MediaWiki skin, and it changes nothing until you add tpt-root.

  1. Load the fonts from Google Fonts

    The kit names four families but bundles none: Oxanium, Oswald, Archivo and JetBrains Mono.

    html
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:ital,wdth,wght@0,62..125,100..900;1,62..125,100..900&family=JetBrains+Mono:wght@400;500;700&family=Oswald:wght@400..700&family=Oxanium:wght@500..800&display=swap">
  2. Load the kit

    Pinned version

    Recommended. A pinned version never changes, so your site never changes by surprise. The integrity hash lets the browser check the file.

    html
    <link rel="stylesheet"
          href="https://www.perfecttower2.com/brandkit/1.1.0/tpt.min.css"
          integrity="sha384-TqbZhg+yz0O1jiwOZhwYxHC9nO3oFMBO7LXCMhSpwUEGa1fL9qkKMq2cVErl62Ts"
          crossorigin="anonymous">

    Latest 1.x

    Always the newest 1.x release. You get fixes and new components without editing your page; nothing you use is renamed until 2.0.

    html
    <link rel="stylesheet" href="https://www.perfecttower2.com/brandkit/v1/tpt.min.css">

    Download

    Host the files yourself, for offline tools or locked-down hosts. The version is in the first line of each file, so you can tell which one you have.

    Files in v1.1.0
    FileContentsSizeGzippedDownload
    tpt.cssTokens, base styles and components, readable27.7 KB5.8 KBDownload tpt.css v1.1.0
    tpt.min.cssThe same, minified23.9 KB5.0 KBDownload tpt.min.css v1.1.0
    tpt-tokens.cssTokens only: colors, type, spacing, no components7.2 KB1.8 KBDownload tpt-tokens.css v1.1.0
    tpt-tokens.min.cssTokens only, minified5.9 KB1.6 KBDownload tpt-tokens.min.css v1.1.0
    tpt-mediawiki.cssMediaWiki adapter: loaded after tpt.css, the theme follows the wiki reader's Appearance choice3.9 KB1.1 KBDownload tpt-mediawiki.css v1.1.0
    tpt-mediawiki.min.cssMediaWiki adapter, minified3.2 KB1.0 KBDownload tpt-mediawiki.min.css v1.1.0
    html
    <!-- tpt.min.css v1.1.0, saved next to your page -->
    <link rel="stylesheet" href="css/tpt.min.css">
    Show the integrity hashes of all files
    sha-384, v1.1.0
    tpt.css                sha384-NcgW/05eh3R95nIZDWeADV6TV40PIozJcIzaX8I1zg0J367Vt+7Gx5tPMbrDqRfp
    tpt.min.css            sha384-TqbZhg+yz0O1jiwOZhwYxHC9nO3oFMBO7LXCMhSpwUEGa1fL9qkKMq2cVErl62Ts
    tpt-tokens.css         sha384-M60MVjCkvJnazZ77GvBRHw6aZfwxKkapFoOhIFnDdz04ZFz5m9gLh4akyWGmsyzF
    tpt-tokens.min.css     sha384-NFkaIUXHke8ietBAX30bkkDa9psPzJL1dWT3O+1XY+PGACtkVe9iM91tvvCvQA2/
    tpt-mediawiki.css      sha384-EaPatNZx0Y4g/sQkFiwKSPxceZ6XK8tBQNgvXwm7e4nU6ygm2KNVfo6T6di2zVEx
    tpt-mediawiki.min.css  sha384-3wSrHJfNINPJdtM7RRax0iZgnwvUIqHzBTbtAB6eACmUqn5NfoL6AsXym2I337Ev
  3. Add tpt-root

    Put the class on <body> or on any wrapper. Everything inside gets the brown ground, the type and the colors; everything outside stays as it is.

    html
    <body class="tpt-root">
  4. Add the fan-made line to your footer

    Required on every page that uses the kit, so nobody mistakes your site for an official one.

    Fan-made with the TPT2 Community Brand Kit. Not affiliated with Fire Sword Studios.

    html
    <p class="tpt-fanmade">Fan-made with the <a href="https://www.perfecttower2.com/brandkit/">TPT2 Community Brand Kit</a>. Not affiliated with Fire Sword Studios.</p>

Starter page

Copy, save as index.html, open
index.html
<!doctype html>
<html lang="en" data-theme="dark">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>My TPT2 calculator</title>
  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:ital,wdth,wght@0,62..125,100..900;1,62..125,100..900&family=JetBrains+Mono:wght@400;500;700&family=Oswald:wght@400..700&family=Oxanium:wght@500..800&display=swap">
  <link rel="stylesheet" href="https://www.perfecttower2.com/brandkit/1.1.0/tpt.min.css"
        integrity="sha384-TqbZhg+yz0O1jiwOZhwYxHC9nO3oFMBO7LXCMhSpwUEGa1fL9qkKMq2cVErl62Ts" crossorigin="anonymous">
</head>
<body class="tpt-root">
  <main>
    <div class="tpt-plate"><h1 class="tpt-display tpt-display--l">My calculator</h1></div>
    <button class="tpt-btn tpt-btn--primary">Calculate</button>
  </main>
  <footer>
    <p class="tpt-fanmade">Fan-made with the <a href="https://www.perfecttower2.com/brandkit/">TPT2 Community Brand Kit</a>. Not affiliated with Fire Sword Studios.</p>
  </footer>
</body>
</html>
Themes and versions

Dark by default, light on request

Set the theme on <html> or on any wrapper. Themes nest, so a light panel can sit on a dark page.

Dark (default)data-theme="dark"
A linkMaxed
Lightdata-theme="light"
A linkMaxed
themes
<html data-theme="light">   <!-- or class="tpt-light" -->
<html data-theme="auto">    <!-- follows the operating system -->
version check
/* Which version is loaded? Run in the browser console: */
getComputedStyle(document.documentElement)
  .getPropertyValue('--tpt-version')   // "1.1.0"
Tokens

Colors by role

Every value is a custom property starting with --tpt-. Use the roles, never the hex values, and both themes work for free. To change a value for your site, redefine the property in your own CSS: the tokens sit in the tpt.tokens cascade layer, so your value wins.

Color tokens by role
ColorTokenUse it for
--tpt-bgPage background.
--tpt-surfacePanels, cards, the site header, the infobox.
--tpt-surface-altNested panels, table headers, hovered rows, tab strips.
--tpt-lineHairlines and dividers. Decorative: never the only edge of a control.
--tpt-line-strongBorders of inputs and secondary buttons; at least 3:1 on bg, surface and surface-alt in both themes.
--tpt-outlineThe logo outline. 2px edge and 3px extrude of block components: primary button, hex badge, plate.
--tpt-inkBody text and headings on bg, surface and surface-alt (11:1 or more in both themes).
--tpt-ink-mutedSecondary text, labels, table headers on bg, surface and surface-alt (6:1 or more).
--tpt-ink-subtleCaptions, timestamps, placeholders on bg, surface and surface-alt (4.6:1 or more).
--tpt-accentLinks and interactive text on bg, surface and surface-alt (4.5:1 or more in both themes).
--tpt-accent-fillFill of the primary button, selected tab marker, active nav marker.
--tpt-on-accentText and icons on accent-fill, brand-sun and the plate's sunburst.
--tpt-focusKeyboard focus ring: 2px solid, 2px offset. Sky blue so it never reads as the orange accent; 4.5:1 on every surface.
--tpt-infoInformational callouts and notes.
--tpt-successPositive change, completed, maxed. As text on bg, surface, surface-alt; as a fill under on-status.
--tpt-warningCaution, spoilers, outdated pages. As text or a fill under on-status.
--tpt-dangerErrors, destructive actions, breaking changes. As text or a fill under on-status.
--tpt-on-statusText on info, success, warning and danger fills (callout tags, badges).
--tpt-module-offensiveModule category Offensive: the game's category color (modules.json categories[].color). Fill only: swatches, bars and hexes. Text next to it stays ink.
--tpt-module-defensiveModule category Defensive: the game's category color (modules.json categories[].color). Fill only: swatches, bars and hexes. Text next to it stays ink.
--tpt-module-utilityModule category Utility: the game's category color (modules.json categories[].color). Fill only: swatches, bars and hexes. Text next to it stays ink.
--tpt-module-ultimateModule category Ultimate: the game's category color (modules.json categories[].color). Fill only: swatches, bars and hexes. Text next to it stays ink.
--tpt-module-legendaryModule category Legendary: the game's category color (modules.json categories[].color). Fill only: swatches, bars and hexes. Text next to it stays ink.
--tpt-module-specialModule category Special: the game's category color (modules.json categories[].color). Fill only: swatches, bars and hexes. Text next to it stays ink.
Show the brand, code and syntax colors (19 more tokens)
Brand, code and syntax color tokens
ColorTokenUse it for
--tpt-brand-emberSunburst start: the orange of the wordmark gradient. Gradient start, display type 24px+ on dark grounds, large fills. Never body text on light grounds (3.4:1).
--tpt-brand-amberSunburst midpoint, derived halfway between brand-ember and brand-sun. The solid behind primary buttons and active markers; text on it is on-accent (7:1).
--tpt-brand-sunSunburst end: the yellow of the wordmark gradient. Gradient end, hover fill of the primary button, highlights on dark grounds. Never text on light grounds.
--tpt-brand-skySymbol sky, light end of the 0071BC to 29ABE2 gradient. Illustration and the symbol only.
--tpt-brand-sky-deepSymbol sky, deep end. Illustration and the symbol only.
--tpt-brand-azureSymbol city skyline. Illustration and the symbol only.
--tpt-brand-navyDeepest blue of the symbol. Illustration and the symbol only.
--tpt-brand-stoneShadow side of the tower in the symbol. Illustration only.
--tpt-brand-mistLit side of the tower; the style guide's light grey. Illustration only.
--tpt-brand-brownTower Brown, exact from the style guide: the outline around the logo and symbol. A fill only, never text on dark grounds: the plate behind sunburst text in both themes, and on-accent text on amber (7.0:1). For brown text in the light theme use ink.
--tpt-brand-whiteBrand white: the top face of the tower. Surface in the light theme; text on fac-statue-of-cubos.
--tpt-code-bgCode block ground. Dark in both themes so script colors stay fixed.
--tpt-code-inkPlain code text on code-bg (13.8:1 or more).
--tpt-syn-keywordScript section words and operators (impulse, condition, action) on code-bg.
--tpt-syn-callFunction ids such as arcade.luckywheel.spin on code-bg.
--tpt-syn-stringStrings on code-bg.
--tpt-syn-numberNumbers and booleans on code-bg.
--tpt-syn-commentComments on code-bg (4.9:1 or more).
--tpt-on-facText and icons on a facility fill (fac-*), except fac-statue-of-cubos, which takes brand-white.

Facility colors

The exact resource colors from the game. Add the class to a page or block; badges, chips and resource numbers inside pick up the color. Use them on small shapes only, never as page backgrounds.

  • Power Plant.tpt-fac-power-plant--tpt-fac-power-plant
  • Mine.tpt-fac-mine--tpt-fac-mine
  • Factory.tpt-fac-factory--tpt-fac-factory
  • Headquarters.tpt-fac-headquarters--tpt-fac-headquarters
  • Arcade.tpt-fac-arcade--tpt-fac-arcade
  • Laboratory.tpt-fac-laboratory--tpt-fac-laboratory
  • Shipyard.tpt-fac-shipyard--tpt-fac-shipyard
  • Trading Post.tpt-fac-trading-post--tpt-fac-trading-post
  • Workshop.tpt-fac-workshop--tpt-fac-workshop
  • Museum.tpt-fac-museum--tpt-fac-museum
  • Construction Firm.tpt-fac-construction-firm--tpt-fac-construction-firm
  • Statue of Cubos.tpt-fac-statue-of-cubos--tpt-fac-statue-of-cubos
Type, spacing and radius
TypeFontClasses
Display--tpt-font-display Oxanium 800.tpt-display with --hero, --xl, --l, --m. One per view.
Headings, labels, numbers--tpt-font-heading Oswald.tpt-h1 to .tpt-h4, .tpt-label, .tpt-num, .tpt-stat
Body--tpt-font-body ArchivoDefault inside .tpt-root; .tpt-lead, .tpt-small, .tpt-caption
Code--tpt-font-mono JetBrains Mono.tpt-code, code.tpt-inline
Spacing and radius--tpt-space-1 to --tpt-space-9 (4 to 96px)--tpt-radius-1 2px, --tpt-radius-2 4px. Nothing rounder.
Components

Copy, paste, done

Each example below is the real kit. The site header, infobox, sunburst rays and more are on the full list in the readable tpt.css.

Buttons

One primary per view
html
<button class="tpt-btn tpt-btn--primary">Calculate</button>
<button class="tpt-btn">Import save</button>
<button class="tpt-btn tpt-btn--ghost">Reset</button>

Hex badge and chip

Sizes: --xs --s --l
VIXIIArcade
html
<span class="tpt-hex tpt-fac-laboratory">
  <span class="tpt-hex__mark">VI</span>
</span>
<a class="tpt-chip tpt-fac-arcade" href="/arcade">
  <span class="tpt-hex tpt-hex--xs"></span>Arcade
</a>

Numbers

E-notation from 1E6
Laboratory resources2.159E62
Wave1,220,516
html
<div class="tpt-stat">
  <span class="tpt-label">Laboratory resources</span>
  <span class="tpt-stat__value">
    <span class="tpt-num">2.159<span class="tpt-num__e">E</span>62</span>
  </span>
</div>

Card

Whole card is one link
html
<a class="tpt-card tpt-fac-workshop" href="/tools/blueprints/">
  <div class="tpt-card__head">
    <span class="tpt-hex tpt-hex--s"><span class="tpt-hex__mark">XII</span></span>
    <h3 class="tpt-card__title">Blueprint builder</h3>
  </div>
  <p class="tpt-card__text">Fill your Workshop slots, then copy the code straight into the game.</p>
</a>

Tags and callout

info · success · warning · danger
GuideNewOutdated
html
<span class="tpt-tag tpt-tag--new">New</span>
<aside class="tpt-callout">
  <span class="tpt-tag tpt-tag--info tpt-callout__tag">Tip</span>
  <p>Export your scripts first.</p>
</aside>

Table

Numbers right-aligned
TierUnlocksCount
INeutral, Fire2
IINature, Electricity2
html
<div class="tpt-table-wrap">
  <table class="tpt-table">
    <thead><tr><th>Tier</th><th class="is-num">Count</th></tr></thead>
    <tbody><tr><td>I</td><td class="is-num">2</td></tr></tbody>
  </table>
</div>

Tabs and search

aria-selected marks the tab

The overview tab is selected.

html
<div class="tpt-tabs" role="tablist">
  <button class="tpt-tab" role="tab" aria-selected="true">Overview</button>
</div>
<label class="tpt-search">
  <svg>…</svg>
  <input class="tpt-input" type="search" placeholder="Search modules">
</label>

Code and plate

One plate per view
My calculator
action generic.wait(1.0)
html
<div class="tpt-plate">
  <h1 class="tpt-display tpt-display--l">My calculator</h1>
</div>
<figure class="tpt-code">
  <pre><code>…</code></pre>
</figure>
Rules

Keep it looking like TPT2

Do
  • Keep corners square: 2px for controls, 4px for cards.
  • Use one primary button per view.
  • Use facility colors on badges, chips and charts.
  • Switch themes with data-theme, not by overriding colors.
  • Use your own logo in the header.
Don't
  • Round buttons into pills or add gloss and soft shadows.
  • Fill large areas or backgrounds with facility colors.
  • Use the TPT2 logo, symbol or key art as your branding.
  • Call your site official or leave out the fan-made line.
  • Edit a pinned file in place: download it or link a new version.
License

What you can use

Included, MIT
  • tpt.css and tpt.min.css
  • tpt-tokens.css and tpt-tokens.min.css, the tokens without components
  • Use, copy, change and ship it, also in paid projects
  • Keep the license header in the file
Not included
  • The Perfect Tower II logos and symbol
  • Key art, screenshots and other game assets
  • Permission to present your site as official
Fonts
  • Oxanium, Oswald, Archivo, JetBrains Mono
  • SIL Open Font License, by their authors
  • Load them from Google Fonts as in step 1

© 2026 Fire Sword Studios · The kit's CSS is MIT licensed; logos and game assets are not.

Writing an article, review or video about the game? Logos, key art and screenshots for that are in the press kit.

Read the full license
MIT License

Copyright (c) 2026 Fire Sword Studios

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

---

Scope of this license

This license covers the CSS files of the TPT2 Community Brand Kit (tpt.css,
tpt.min.css, tpt-tokens.css, tpt-tokens.min.css and the sources in src/).

It does not cover The Perfect Tower II name as a logo, the logos, the symbol,
the key art, screenshots or any other game assets. These are not part of the
kit and remain the property of Fire Sword Studios.

The fonts the kit names (Archivo, Oswald, Oxanium, JetBrains Mono) are not
bundled. They are licensed by their authors under the SIL Open Font License 1.1.
Changelog

Versions

Minor and patch releases never rename or remove anything. A new major version does, and old versions stay online.

All notable changes to the TPT2 Community Brand Kit. Versions follow Semantic Versioning:

  • Major (2.0.0): a class, token or theme switch is renamed or removed. Sites pinned to the old major keep working.
  • Minor (1.1.0): new classes, tokens or facility colors. Nothing existing changes.
  • Patch (1.0.1): fixes to existing styles, such as a contrast or spacing bug.
  1. v1.1.0

    Released 7 Oct 2026

    New file tpt-mediawiki.css (and .min.css): the MediaWiki adapter. MediaWiki 1.43+ with Vector 2022 marks the reader's theme on <html> as skin-theme-clientpref-day, -night or -os. The adapter switches the kit's light and dark token values on those classes, so a wiki that loads tpt.css and then the adapter follows the reader's Appearance choice. .notheme and .skin-invert, which Wikimedia skins keep light in night mode, get the light values. The values are generated from the same tokens as tpt.css; nothing is copied by hand.

    New tokens for the six module categories, in the game's colors from modules.json (categories[].color): --tpt-module-offensive, -defensive, -utility, -ultimate, -legendary and -special. They are fills only, like the facility colors: text next to them stays ink. Scope a block with .tpt-module-<category> (sets --tpt-module) and mark it with .tpt-module-swatch.

    No class, token or theme switch is renamed or removed. build.py now keeps the theme selectors in a THEMES table and the adapters in ADAPTERS. Two fixes to existing styles:

    The hex badge's mark (.tpt-hex__mark) sits in the middle of the hexagon. Oxanium's line box put digits and capitals about .06em high, and the 1px padding-top only made up half of it, so small badges (.tpt-hex--s) showed their mark 1 to 2px high. The box is now trimmed to cap height and baseline (text-box: trim-both cap alphabetic); browsers without text-box get top: .08em instead.

    The fan-made line (.tpt-fanmade) wraps as one line of text. 1.0.1 laid it out with flex, which turned the text and the link into columns on narrow screens.

    The README states the number rule that the game, the website and the kit's examples already follow: scientific notation with an uppercase E, set smaller in .tpt-num__e (7.544E7).

  2. v1.0.1

    Released 5 Oct 2026

    The E in E-notation (.tpt-num__e, as in 1.5E14) is easier to read: a small capital at 72% of the digits' size, weight 600 and --tpt-ink-muted instead of --tpt-ink-subtle (at least 6.0:1 on every ground in the light theme, 7.5:1 in the dark theme). It still sits on the baseline between the digits.

    Also fixes six class names that 1.0.0 shipped mangled, so markup written to the design system's docs got no style:

    Documented class (now styled)Wrong name in 1.0.0
    .tpt-label--s.tpt-label--tpt-hex-size
    .tpt-hex--s.tpt-hex--tpt-hex-size
    .tpt-tag--info.tpt-tag--tpt-info
    .tpt-tag--success.tpt-tag--tpt-success
    .tpt-tag--warning.tpt-tag--tpt-warning
    .tpt-tag--danger.tpt-tag--tpt-danger

    The wrong names are dropped, not kept as aliases: 1.0.0 was never deployed, so no site depends on them. Use 1.0.1 or v1, not 1.0.0.

    Cause: the script that turned the design system's stylesheet into the kit source prefixed custom properties with a plain text replacement that also matched these modifiers. build.py now stops when --tpt- appears in a selector, and the design system bundle only strips the prefix from custom properties.

  3. v1.0.0

    Prepared 5 Oct 2026, never released

    First release.

    • Tokens for two themes (dark default, light, and auto) as --tpt- custom properties, including the 12 facility colors from the game.
    • Base styles scoped to .tpt-root.
    • Components: buttons, site header and nav, inputs and search, tabs, number readouts and stats, facility scoping, hex badges, chips, tags, cards, callouts, tables, infobox, code blocks, plate, sunburst rays and the fan-made line.
    • Tokens in the tpt.tokens cascade layer so sites can override them; base and components unlayered so a site's global element rules cannot override them.
    • --tpt-version custom property and a version banner in every file.