1export const PRIMER = '#5d5a54'; 2 3export const DEEP = '#2f5f86'; 4export const ROAD = '#c4a670'; 5export const SNOW = '#eeeeea'; 6export const TRUNK_PAINT = '#5a3d22'; 7export const BURNT = '#3d2a22'; 8 9export const BIOMES = [ 10 { kind: 'frost', ground: '#d9dfe0', hill: '#c3ccd0', rock: '#8c99a6', tree: '#4f7a72', water: '#6d9fbd', canopy: 'frostpine', rocks: 'shard' }, 11 { kind: 'frost', ground: '#e4e8e8', hill: '#cdd6da', rock: '#7f98b0', tree: '#426e6a', water: '#6497b8', canopy: 'frostpine', rocks: 'shard' }, 12 { kind: 'frost', ground: '#aebfb6', hill: '#9cada6', rock: '#808a8e', tree: '#4d7468', water: '#7fb2c0', canopy: 'frostpine', rocks: 'shard' }, 13 { kind: 'meadow', ground: '#8fae55', hill: '#7e9c4a', rock: '#9a958a', tree: '#5a8f3c', water: '#4d87a6', canopy: 'round', rocks: 'boulder', tufts: true }, 14 { kind: 'forest', ground: '#789f4a', hill: '#6a8c42', rock: '#8d877c', tree: '#2f6a30', water: '#4a80a0', canopy: 'pine', rocks: 'boulder', tufts: true }, 15 { kind: 'bog', ground: '#748c56', hill: '#677d4a', rock: '#77766c', tree: '#4a6a3a', water: '#4f8a80', canopy: 'bog', rocks: 'boulder', tufts: true }, 16 { kind: 'badlands', ground: '#c07a4a', hill: '#c98d52', rock: '#cf9b58', tree: '#a8402e', water: '#4d87a6', canopy: 'dead', rocks: 'block' }, 17 { kind: 'badlands', ground: '#9a6c48', hill: '#8a5f40', rock: '#85695a', tree: '#b0473a', water: '#4a7c9c', canopy: 'dead', rocks: 'block' }, 18 { kind: 'jungle', ground: '#5f9a45', hill: '#508a3f', rock: '#7a7a5c', tree: '#2f7a32', water: '#3f8a88', canopy: 'round', rocks: 'boulder', tufts: true }, 19]; 20 21const CLASS_PAINT = { fighter: '#a8443a', rogue: '#4f7d4a', mage: '#4a62a8', cleric: '#d9cfb0', ranger: '#8a7440' }; 22export const classColor = (c) => CLASS_PAINT[c] || '#8a5a7a'; 23 24const FACTION_PAINT = ['#7e3b36', '#5b4a7a', '#3f6a5c', '#7a5a2a', '#55525e', '#7a3a5a', '#4a6a2a']; 25export function factionColor(id) { 26 let h = 0; 27 for (const c of String(id)) h = (h * 31 + c.charCodeAt(0)) >>> 0; 28 return FACTION_PAINT[h % FACTION_PAINT.length]; 29}