Rarity Tints
Every enemy archetype crossed against five rarity tiers produces 5 variants (<archetype>_<rarity>). Each variant carries a tint color string that signals tier at a glance — the same enemy silhouette reads as common, uncommon, rare, epic, or legendary purely by hue.
The canonical table
RARITY_TINTS lives in src/starship-survivors/data/enemies/_types.ts and is the single source of truth for per-rarity color:
| Rarity | Hex | Reads as |
|---|---|---|
common | #cccccc | neutral light grey |
uncommon | #33cc55 | green |
rare | #3388ff | blue |
epic | #aa44ff | purple |
legendary | #ff8800 | orange / gold |
The order matches RARITY_ORDER (weakest → strongest) and the multiplier table RARITY_MULTS from the same file.
How variants pick up the tint
buildEnemyTypes() in src/starship-survivors/data/enemies/index.ts iterates BASE_ARCHETYPES × RARITY_ORDER. For every pair it writes tint = RARITY_TINTS[rarity] onto the generated EnemyTypeDef. After build, every regular enemy id (orb_common, charger_legendary, sprinter_uncommon, etc.) has its tier color baked into the type definition and is reachable through ENEMY_TYPE_MAP[id].tint.
Boss-roster enemies in BOSS_ENEMY_TYPES (Killer Croc, Caiman, Stinger, Orca, Pierre, Marco, the Industria mechs, Solaris Hauler/Valet/Oracle, the four Prism gems) hand-author their tint directly per body so factions get identity colors (e.g. #4aaa55 gator green for Killer Croc, #e02828 red for Ruby) instead of inheriting the rarity palette. Their rarity field still drives stat scaling, but tint is divorced from the rarity wheel for these entries.
Where the tint is consumed
The runtime combat renderer paints enemies through the sprite-atlas / outline-stamp pipeline (engine/rendering/atlas-builder.ts, engine/rendering/enemy-sprites.ts), which does not read EnemyTypeDef.tint at draw time — silhouette identity comes from HULL_SHAPE_MAP and the sprite atlas. The tint field is a presentation tag for UI surfaces that need to color-code enemies outside the combat canvas:
src/starship-survivors/screens/RunStatsScreen.tsxreadsdef?.tint ?? RARITY_TINTS.commonto color bars, dots, and group labels in the post-run kill breakdown. It also usesRARITY_TINTS[groupName]directly when grouping by rarity rather than by type.src/starship-survivors/screens/playground/EnemiesTab.tsxusest.tintfor the per-type swatch andcommonVariantOfArch.tintfor the archetype-baseline label in the dev playground.
If a future renderer pass wants per-rarity stroke or rim color, this field is the hook to read.
Distinction from ENEMY_TIER_COLORS
ENEMY_TIER_COLORS (also in src/starship-survivors/data/enemies/index.ts) is a separate, smaller record:
default: '#cc3333'
common: '#cc3333'
uncommon: '#3388ff'
rare: '#aa44ff'
legendary: '#ff8800'
It is not consistent with RARITY_TINTS:
commonis danger-red#cc3333instead of neutral grey.uncommonis blue, but inRARITY_TINTSblue israre.rareis purple, but inRARITY_TINTSpurple isepic.epicis missing entirely.legendaryis orange in both, the only tier where they agree.
This looks like a copy-paste shift dating from before epic was added to the rarity wheel. It is also unreferenced by any consumer in src/ (a re-export exists in data/enemies.ts but nothing reads it). Treat RARITY_TINTS as canonical for per-rarity color and ENEMY_TIER_COLORS as legacy — see the open note in wiki/data-enemies.md.
Authoring rule
When adding a new archetype, do nothing: the cross-product in buildEnemyTypes() auto-assigns the right tint per rarity. When adding a new boss-roster body, set tint to a faction-identity color, not a rarity color — boss entries are about “which faction” not “which tier.”