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.
Design tokens for two themes, the 12 facility colors from the game, and 16 components. No logos, symbol or key art: those stay ours.
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.
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">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 File Contents Size Gzipped Download tpt.cssTokens, base styles and components, readable 27.7 KB 5.8 KB Download tpt.css v1.1.0 tpt.min.cssThe same, minified 23.9 KB 5.0 KB Download tpt.min.css v1.1.0 tpt-tokens.cssTokens only: colors, type, spacing, no components 7.2 KB 1.8 KB Download tpt-tokens.css v1.1.0 tpt-tokens.min.cssTokens only, minified 5.9 KB 1.6 KB Download tpt-tokens.min.css v1.1.0 tpt-mediawiki.cssMediaWiki adapter: loaded after tpt.css, the theme follows the wiki reader's Appearance choice 3.9 KB 1.1 KB Download tpt-mediawiki.css v1.1.0 tpt-mediawiki.min.cssMediaWiki adapter, minified 3.2 KB 1.0 KB Download 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-3wSrHJfNINPJdtM7RRax0iZgnwvUIqHzBTbtAB6eACmUqn5NfoL6AsXym2I337EvAdd 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">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<!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>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.
<html data-theme="light"> <!-- or class="tpt-light" -->
<html data-theme="auto"> <!-- follows the operating system -->/* Which version is loaded? Run in the browser console: */
getComputedStyle(document.documentElement)
.getPropertyValue('--tpt-version') // "1.1.0"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 | Token | Use it for |
|---|---|---|
--tpt-bg | Page background. | |
--tpt-surface | Panels, cards, the site header, the infobox. | |
--tpt-surface-alt | Nested panels, table headers, hovered rows, tab strips. | |
--tpt-line | Hairlines and dividers. Decorative: never the only edge of a control. | |
--tpt-line-strong | Borders of inputs and secondary buttons; at least 3:1 on bg, surface and surface-alt in both themes. | |
--tpt-outline | The logo outline. 2px edge and 3px extrude of block components: primary button, hex badge, plate. | |
--tpt-ink | Body text and headings on bg, surface and surface-alt (11:1 or more in both themes). | |
--tpt-ink-muted | Secondary text, labels, table headers on bg, surface and surface-alt (6:1 or more). | |
--tpt-ink-subtle | Captions, timestamps, placeholders on bg, surface and surface-alt (4.6:1 or more). | |
--tpt-accent | Links and interactive text on bg, surface and surface-alt (4.5:1 or more in both themes). | |
--tpt-accent-fill | Fill of the primary button, selected tab marker, active nav marker. | |
--tpt-on-accent | Text and icons on accent-fill, brand-sun and the plate's sunburst. | |
--tpt-focus | Keyboard focus ring: 2px solid, 2px offset. Sky blue so it never reads as the orange accent; 4.5:1 on every surface. | |
--tpt-info | Informational callouts and notes. | |
--tpt-success | Positive change, completed, maxed. As text on bg, surface, surface-alt; as a fill under on-status. | |
--tpt-warning | Caution, spoilers, outdated pages. As text or a fill under on-status. | |
--tpt-danger | Errors, destructive actions, breaking changes. As text or a fill under on-status. | |
--tpt-on-status | Text on info, success, warning and danger fills (callout tags, badges). | |
--tpt-module-offensive | Module 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-defensive | Module 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-utility | Module 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-ultimate | Module 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-legendary | Module 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-special | Module 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)
| Color | Token | Use it for |
|---|---|---|
--tpt-brand-ember | Sunburst 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-amber | Sunburst 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-sun | Sunburst 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-sky | Symbol sky, light end of the 0071BC to 29ABE2 gradient. Illustration and the symbol only. | |
--tpt-brand-sky-deep | Symbol sky, deep end. Illustration and the symbol only. | |
--tpt-brand-azure | Symbol city skyline. Illustration and the symbol only. | |
--tpt-brand-navy | Deepest blue of the symbol. Illustration and the symbol only. | |
--tpt-brand-stone | Shadow side of the tower in the symbol. Illustration only. | |
--tpt-brand-mist | Lit side of the tower; the style guide's light grey. Illustration only. | |
--tpt-brand-brown | Tower 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-white | Brand white: the top face of the tower. Surface in the light theme; text on fac-statue-of-cubos. | |
--tpt-code-bg | Code block ground. Dark in both themes so script colors stay fixed. | |
--tpt-code-ink | Plain code text on code-bg (13.8:1 or more). | |
--tpt-syn-keyword | Script section words and operators (impulse, condition, action) on code-bg. | |
--tpt-syn-call | Function ids such as arcade.luckywheel.spin on code-bg. | |
--tpt-syn-string | Strings on code-bg. | |
--tpt-syn-number | Numbers and booleans on code-bg. | |
--tpt-syn-comment | Comments on code-bg (4.9:1 or more). | |
--tpt-on-fac | Text 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 | Font | Classes |
|---|---|---|
| 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 Archivo | Default 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. |
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<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<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<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<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<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| Tier | Unlocks | Count |
|---|---|---|
| I | Neutral, Fire | 2 |
| II | Nature, Electricity | 2 |
<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 tabThe overview tab is selected.
The data tab is selected.
<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 viewaction generic.wait(1.0)<div class="tpt-plate">
<h1 class="tpt-display tpt-display--l">My calculator</h1>
</div>
<figure class="tpt-code">
<pre><code>…</code></pre>
</figure>Keep it looking like TPT2
- 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.
- 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.
What you can use
- 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
- The Perfect Tower II logos and symbol
- Key art, screenshots and other game assets
- Permission to present your site as official
- 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.
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.
v1.1.0
Released 7 Oct 2026New file
tpt-mediawiki.css(and.min.css): the MediaWiki adapter. MediaWiki 1.43+ with Vector 2022 marks the reader's theme on<html>asskin-theme-clientpref-day,-nightor-os. The adapter switches the kit's light and dark token values on those classes, so a wiki that loadstpt.cssand then the adapter follows the reader's Appearance choice..nothemeand.skin-invert, which Wikimedia skins keep light in night mode, get the light values. The values are generated from the same tokens astpt.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,-legendaryand-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.pynow keeps the theme selectors in aTHEMEStable and the adapters inADAPTERS. 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 1pxpadding-toponly 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 withouttext-boxgettop: .08eminstead.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).v1.0.1
Released 5 Oct 2026The 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-mutedinstead 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-dangerThe 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.pynow stops when--tpt-appears in a selector, and the design system bundle only strips the prefix from custom properties.v1.0.0
Prepared 5 Oct 2026, never releasedFirst 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.tokenscascade layer so sites can override them; base and components unlayered so a site's global element rules cannot override them. --tpt-versioncustom property and a version banner in every file.
- Tokens for two themes (dark default, light, and auto) as