SPB Git

Repository Public

palettes.py 28.1 KB 413 lines python

1# =============================================================================2#                  SP BOUCHER | SOFTWARE & RESEARCH3#             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING4# =============================================================================5#6# PROJECT METADATA7# -----------------------------------------------------------------------------8# Project          : KA Maps Engine9# File             : themes/tools/palettes.py10# Description      : Palettes et partis pris des sept thèmes KA Maps.11# Module           : themes12# Repository       : https://git.spboucher.ai/ka-maps-engine13# Created          : 2026-12-0114# Last Modified    : 2026-12-0115#16# =============================================================================17# AUTHOR & PROFESSIONAL AFFILIATION18# =============================================================================19#20# Author           : Simon-Pierre Boucher21# Position         : Professor of Finance22# Institution      : Université du Québec en Outaouais (UQO)23# Department       : Département des sciences administratives24# Organization     : SP Boucher25#26# Website          : https://spboucher.ai27# Git              : https://git.spboucher.ai28#29# =============================================================================30# OFFICIAL CONTACT DIRECTORY31# =============================================================================32#33# General          : info@spboucher.ai34# Professional     : contact@spboucher.ai35# Direct           : simon@spboucher.ai36# Research         : research@spboucher.ai37# Development      : dev@spboucher.ai38# Support          : support@spboucher.ai39# Security/Admin   : admin@spboucher.ai40# Notifications    : notifications@spboucher.ai41#42# Preferred Contact: support@spboucher.ai43#44# =============================================================================45# COPYRIGHT & INTELLECTUAL PROPERTY46# =============================================================================47#48# Copyright (c) 202649# Simon-Pierre Boucher50#51# All rights reserved where applicable.52#53# This file is governed by the applicable project license,54# copyright notices, institutional agreements and relevant law.55#56# Unless expressly authorized by the applicable license or57# rights holder, copying, redistribution, sublicensing,58# publication and commercial exploitation are not permitted.59#60# Existing third-party rights and notices remain unaffected.61#62# =============================================================================63# CONFIDENTIALITY & SECURITY64# =============================================================================65#66# Classification   : Public67# Distribution     : Public repository; use is governed by the project license68# Security Contact : admin@spboucher.ai69#70# Access to this source does not independently grant permission71# to redistribute or disclose confidential materials.72#73# Do not embed credentials, private keys, access tokens,74# certificates or confidential personal information.75#76# =============================================================================77# LICENSE & MAINTENANCE78# =============================================================================79#80# License          : None specified (no license file in this repository)81# Maintainer       : Simon-Pierre Boucher82# Technical Contact: dev@spboucher.ai83#84# =============================================================================85# END OF SP BOUCHER SOURCE HEADER86# =============================================================================8788"""Palettes et partis pris des sept thèmes KA Maps. Source de `build.py`.8990Chaque thème a les mêmes clés de palette (les variantes de marque et les couches y renvoient par91`@nom`). Les rampes de données s'appellent `heat-*` (valeur), `cool-*` (rendement) et92`heat-div-*` / `cool-div-*` (écart) ; les teintes de marqueur commencent par `accent`.93"""949596def A(c, a):97    return ["alpha", c, a]9899100def M(a, b, t):101    return ["mix", a, b, t]102103104# ------------------------------------------------------------------ rampes de données105# Clarté strictement monotone, teintes sur l'axe bleu ↔ orangé (sûr pour les trois daltonismes).106SCALES_LIGHT = {107    "heat-0": "#f6e9c6", "heat-1": "#e6bf78", "heat-2": "#cf8a45", "heat-3": "#a4502b", "heat-4": "#5e2216",108    "cool-0": "#d6eadf", "cool-1": "#a8d0c5", "cool-2": "#5fa5a6", "cool-3": "#2b7186", "cool-4": "#163a5e",109    "cool-div-2": "#1f4e79", "cool-div-1": "#7fa8c4", "heat-div-1": "#dc9a62", "heat-div-2": "#8e3a1c",110    "neutral": "#ece8dd", "null": "#b9b3a899",111}112SCALES_DARK = {113    "heat-0": "#3b2a22", "heat-1": "#7d4526", "heat-2": "#b86b32", "heat-3": "#dea55a", "heat-4": "#f6e2a6",114    "cool-0": "#1d3140", "cool-1": "#28586b", "cool-2": "#3b8a8d", "cool-3": "#7fbda6", "cool-4": "#d6ecc6",115    "cool-div-2": "#9fd0ea", "cool-div-1": "#4f86a3", "heat-div-1": "#b46a38", "heat-div-2": "#f4b06c",116    "neutral": "#3a3835", "null": "#6e6a6399",117}118119# ------------------------------------------------------------------ signature120SIGNATURE = {121    "land": "#f2ede2", "paper": "#fcfaf5", "ink": "#27231e", "ink-soft": "#585147", "ink-faint": "#676054",122    "halo": A("#f6f2e9", 0.9),123    "water": "#c2d2d6", "waterway": "#a9c0c8", "water-line": "#8da7b1", "water-ink": "#38586a",124    "forest": "#d6dfc8", "grass": "#e1e6d3", "farmland": "#efe9d6", "wetland": "#d4dfd6", "rock": "#e6e0d5", "sand": "#eee5cc",125    "scrub": "#e0e4d0", "glacier": "#f5f7f6",126    "residential": "#eee8dc", "commercial": "#efe5d7", "industrial": "#e7e2d9", "airport": "#e7e3dc", "military": "#e6dfd4",127    "quarry": "#e0dacd", "parking": "#ebe6dc", "school": "#efe6d0", "hospital": "#f1e3dc", "cemetery": "#d9dfce",128    "park": "#cddabc", "park-line": "#b3c4a1", "golf": "#d3dec4", "pitch": "#c6d5b6", "pitch-line": "#aebf9c", "park-ink": "#496241",129    "road": "#ffffff", "road-major": "#fffaee", "road-motorway": "#f8e9c9", "road-service": "#faf7f1",130    "road-far": "#c9bfae", "road-far-major": "#a4947a", "road-tunnel": "#f4f0e8", "road-far-tunnel": "#d6cebf",131    "casing": "#c4baa8", "casing-soft": "#d6cebf", "casing-major": "#b1a184", "casing-motorway": "#9a8662",132    "casing-bridge": "#857b6c", "casing-tunnel": "#d9d2c5",133    "path": "#a99c86", "cycleway": "#86a07f", "track": "#ab9c7f", "rail": "#8f877a", "ferry": "#7f97a3",134    "transit": "#6a5f51", "transit-ink": "#4a4137", "axis": "#8f877a",135    "boundary": "#7e7466", "boundary-minor": "#a89f90", "parcel": "#bdb3a1",136    "building": "#e6e0d3", "building-outline": "#bdb29f", "roof": "#f6f2ea", "wall": "#e3dccf",137    "building-estimated": "#e6dfd1", "building-outline-estimated": "#c9c0af", "roof-estimated": "#f0ebe1", "wall-estimated": "#e0d9cc",138    "shield": "#fcfaf5", "shield-stroke": "#8f877a", "shield-ink": "#463f36",139    "shield-major": "#463f36", "shield-major-stroke": "#463f36", "shield-major-ink": "#fcfaf5",140    "poi-education": "#6b4f2c", "poi-health": "#8f3a2e", "poi-commerce": "#585147", "poi-major": "#463f36",141    "accent": "#8c3b26", "accent-ink": "#ffffff", "accent-soft": M("#8c3b26", "#f2ede2", 0.55),142    "accent-selected": "#27231e", "accent-selected-ink": "#fcfaf5", "accent-selected-line": "@accent",143    "accent-seen": "#746f65", "accent-seen-ink": "#ffffff",144    "accent-good": "#0d5458", "accent-good-ink": "#ffffff", "accent-high": "#9c6700", "accent-high-ink": "#ffffff",145    "accent-sold": "#27231e", "accent-sold-ink": "#fcfaf5",146    "pill-paper": "#fcfaf5", "pill-line": "#fcfaf5", "pill-shadow": "#27231e33",147    **SCALES_LIGHT,148}149B_SIGNATURE = {150    10: ("boundary-minor", [[12, 0.5], [16, 1.0]], [2, 3]),151    8: ("boundary-minor", [[10, 0.5], [16, 1.3]], [5, 3]),152    6: ("boundary-minor", [[8, 0.5], [14, 1.2]], [7, 2, 1, 2]),153    4: ("boundary", [[2, 0.6], [8, 1.2], [14, 1.8]], [8, 2.5, 1.5, 2.5]),154    2: ("boundary", [[0, 0.7], [6, 1.5], [14, 2.2]], None),155}156157158def derive(base, **over):159    p = dict(base)160    p.update({k.replace("_", "-"): v for k, v in over.items()})161    return p162163164# ------------------------------------------------------------------ midnight165MIDNIGHT = {166    "land": "#21201d", "paper": "#2a2826", "ink": "#ece5d6", "ink-soft": "#bfb7a8", "ink-faint": "#9c9588",167    "halo": A("#161514", 0.88),168    "water": "#0d1012", "waterway": "#101416", "water-line": "#42474a", "water-ink": "#8d979b",169    "forest": "#1d221b", "grass": "#21241e", "farmland": "#24221c", "wetland": "#1b2120", "rock": "#272623", "sand": "#28251f",170    "scrub": "#20231c", "glacier": "#303131",171    "residential": "#232220", "commercial": "#252421", "industrial": "#1f1e1c", "airport": "#262523", "military": "#1f1e1c",172    "quarry": "#272623", "parking": "#252421", "school": "#27251f", "hospital": "#282422", "cemetery": "#222620",173    "park": "#232b21", "park-line": "#313a2d", "golf": "#222920", "pitch": "#283025", "pitch-line": "#353e31", "park-ink": "#93a089",174    "road": "#3b3833", "road-major": "#4a453e", "road-motorway": "#5e5647", "road-service": "#302e2a",175    "road-far": "#5d574d", "road-far-major": "#a39679", "road-tunnel": "#262422", "road-far-tunnel": "#2c2a27",176    "casing": "#121110", "casing-soft": "#161514", "casing-major": "#100f0e", "casing-motorway": "#0e0d0c",177    "casing-bridge": "#060606", "casing-tunnel": "#1a1917",178    "path": "#555047", "cycleway": "#4f5a4b", "track": "#58513f", "rail": "#5c574e", "ferry": "#4a5357",179    "transit": "#8a8173", "transit-ink": "#cdbf9f", "axis": "#5c574e",180    "boundary": "#8f887b", "boundary-minor": "#5f5a51", "parcel": "#44403a",181    "building": "#2a2826", "building-outline": "#3d3a35", "roof": "#5e584f", "wall": "#423e38", "building-edge": "#8a8375",182    "building-estimated": "#272523", "building-outline-estimated": "#35322e", "roof-estimated": "#544f47", "wall-estimated": "#3b3833",183    "shield": "#262422", "shield-stroke": "#6f695e", "shield-ink": "#d8d0c0",184    "shield-major": "#cdbf9f", "shield-major-stroke": "#cdbf9f", "shield-major-ink": "#1c1b19",185    "poi-education": "#e0cfa9", "poi-health": "#e6c2b8", "poi-commerce": "#d9d2c3", "poi-major": "#ece5d6",186    "accent": "#7e3320", "accent-ink": "#ffffff", "accent-soft": M("#7e3320", "#1c1b19", 0.55),187    "accent-selected": "#100f0e", "accent-selected-ink": "#fbf8f0", "accent-selected-line": "#efe8da",188    "accent-seen": "#69645b", "accent-seen-ink": "#ffffff",189    "accent-good": "#0d5458", "accent-good-ink": "#ffffff", "accent-high": "#876000", "accent-high-ink": "#ffffff",190    "accent-sold": "#27231e", "accent-sold-ink": "#efe8da",191    "pill-paper": "#fbf8f0", "pill-line": "#efe8da", "pill-shadow": "#00000073",192    **SCALES_DARK,193}194B_MIDNIGHT = B_SIGNATURE195196# ------------------------------------------------------------------ city3d : maquette d'architecte197CITY3D = derive(198    SIGNATURE,199    land="#e9e7e1", paper="#fbfaf7", halo=A("#f1efea", 0.9), ink="#26241f", ink_soft="#57534b", ink_faint="#646058",200    water="#b7c6cb", waterway="#a3b6bd", water_line="#8fa3ab", water_ink="#314e5c",201    forest="#cfd6c2", grass="#d9decd", farmland="#e6e2d4", wetland="#cdd7cf", rock="#e0ddd5", sand="#e5dfcf", scrub="#d9dccb", glacier="#f2f4f3",202    residential="#e6e3dc", commercial="#e7e2d9", industrial="#e1ded7", airport="#e2dfd9", military="#e0dcd3", quarry="#dad6cc", parking="#e3e0d9",203    school="#e6e0d0", hospital="#e8ded9", cemetery="#d3d9c9",204    park="#c6d2b6", park_line="#aebd9d", golf="#ccd7be", pitch="#bfcdb0", pitch_line="#a9b998", park_ink="#3f5739",205    road="#f7f6f2", road_major="#fbf8f0", road_motorway="#f3ead6", road_service="#f1efea",206    road_far="#c2bcb0", road_far_major="#9e9684", road_tunnel="#eceae4", road_far_tunnel="#d0cbc0",207    casing="#c9c4b9", casing_soft="#d5d1c7", casing_major="#b8b09f", casing_motorway="#a39883", casing_bridge="#7f786c", casing_tunnel="#d6d2c8",208    building="#f1eee8", building_outline="#b9b2a4", roof="#fdfcfa", wall="#e0dbd1",209    building_estimated="#ebe8e1", building_outline_estimated="#c6c0b3", roof_estimated="#f1eee7", wall_estimated="#d9d4c9",210    accent="#8a3a2a", accent_soft=M("#8a3a2a", "#e9e7e1", 0.55),211)212213# ------------------------------------------------------------------ minimal : fond qui se tait214MINIMAL = derive(215    SIGNATURE,216    land="#f5f3ee", paper="#fdfcfa", halo=A("#f8f6f2", 0.9), ink="#3a362f", ink_soft="#625c52", ink_faint="#69635a",217    water="#dbe2e3", waterway="#cfd8da", water_line="#c3cdd0", water_ink="#4f6670",218    forest="#ecede4", grass="#eeefe7", farmland="#f3f1ea", wetland="#e9ece8", rock="#efede8", sand="#f2efe6", scrub="#eceee5", glacier="#f8f9f8",219    residential="#f5f3ee", commercial="#f5f3ee", industrial="#f1efea", airport="#f0eee9", military="#f1efea", quarry="#eeebe5", parking="#f3f1ec",220    school="#f5f3ee", hospital="#f5f3ee", cemetery="#e9ece2",221    park="#e3e9da", park_line="#d3dcc8", golf="#e6ebde", pitch="#dfe6d5", pitch_line="#d0d9c5", park_ink="#56694f",222    road="#ffffff", road_major="#ffffff", road_motorway="#ffffff", road_service="#fbfaf7",223    road_far="#dcd8cf", road_far_major="#c4beb2", road_tunnel="#f8f7f3", road_far_tunnel="#e6e3dc",224    casing="#e1ddd4", casing_soft="#e8e5dd", casing_major="#d5d0c5", casing_motorway="#c6c0b3", casing_bridge="#aaa497", casing_tunnel="#eae7e0",225    path="#cfc9bc", cycleway="#c3cdbb", track="#cfc8b8", rail="#bdb7ab", ferry="#aebbc0", transit="#a39c8f", transit_ink="#6f685c", axis="#bdb7ab",226    boundary="#857f73", boundary_minor="#b5afa3", parcel="#d6d1c6",227    building="#ebe8e1", building_outline="#dad5ca", roof="#faf9f6", wall="#e0dcd3",228    building_estimated="#eeebe5", building_outline_estimated="#e0dcd2", roof_estimated="#f6f4f0", wall_estimated="#e5e1d9",229    shield="#fdfcfa", shield_stroke="#bdb7ab", shield_ink="#625c52",230    shield_major="#fdfcfa", shield_major_stroke="#9d968a", shield_major_ink="#4a453d",231    poi_education="#625c52", poi_health="#625c52", poi_commerce="#625c52", poi_major="#4a453d",232    accent="#3a362f", accent_ink="#ffffff", accent_soft=M("#3a362f", "#f5f3ee", 0.55),233    accent_selected="#a8431f", accent_selected_ink="#ffffff", accent_sold="#111111", accent_good="#0b6466", accent_high="#965800",234    accent_seen="#75716a", pill_paper="#fdfcfa", pill_line="#fdfcfa",235)236B_MINIMAL = {237    10: ("boundary-minor", [[12, 0.4], [16, 0.8]], [2, 3]),238    8: ("boundary-minor", [[10, 0.4], [16, 1.0]], [5, 3]),239    6: ("boundary-minor", [[8, 0.4], [14, 1.0]], [7, 2, 1, 2]),240    4: ("boundary", [[2, 0.5], [8, 1.0], [14, 1.4]], [8, 2.5, 1.5, 2.5]),241    2: ("boundary", [[0, 0.6], [6, 1.2], [14, 1.8]], None),242}243244# ------------------------------------------------------------------ terrain : le pays physique245TERRAIN = derive(246    SIGNATURE,247    land="#efe8d6", paper="#fbf8f0", halo=A("#f4eede", 0.9), ink="#2b2519", ink_soft="#574d3c", ink_faint="#5d533f",248    water="#a9c9d6", waterway="#7fb0c4", water_line="#5f93a9", water_ink="#1f566e",249    forest="#bfd0a6", grass="#d6dfbb", farmland="#ece2bf", wetland="#bfd5cc", rock="#d8d0c2", sand="#ecdfb8", scrub="#cdd7ae", glacier="#f7fafa",250    residential="#e9dfcc", commercial="#e9dfcc", industrial="#e2d9c8", airport="#e2dbcc", military="#e0d6c2", quarry="#d6ccb8", parking="#e6ddcb",251    school="#e9dfcc", hospital="#e9dfcc", cemetery="#c9d6b3",252    park="#b5cc9c", park_line="#93b07a", golf="#c1d4a8", pitch="#b0c896", pitch_line="#93b07a", park_ink="#35562c",253    road="#fffdf6", road_major="#fffaea", road_motorway="#f6e3bb", road_service="#f6f1e4",254    road_far="#b9a98c", road_far_major="#8d7754", road_tunnel="#f1ebdb", road_far_tunnel="#cfc3aa",255    casing="#b3a385", casing_soft="#c8bb9f", casing_major="#9c8862", casing_motorway="#86704a", casing_bridge="#6e5f45", casing_tunnel="#d2c7ae",256    path="#8a6240", cycleway="#6f8f5f", track="#96724a", rail="#7d7362", ferry="#4f8299", transit="#6a5f51", axis="#7d7362",257    boundary="#6f6350", boundary_minor="#9c8f78", parcel="#b3a385",258    building="#d6c9b1", building_outline="#a8987a", roof="#efe6d3", wall="#c9bb9f",259    building_estimated="#dbcfb9", building_outline_estimated="#b5a688", roof_estimated="#ebe2cf", wall_estimated="#cfc2a8",260    poi_education="#6b4f2c", poi_health="#8f3a2e", poi_commerce="#574d3c", poi_major="#463f36",261    accent="#7a3e1d", accent_soft=M("#7a3e1d", "#efe8d6", 0.55),262)263264# ------------------------------------------------------------------ financial : fond d'analyse265FINANCIAL = derive(266    SIGNATURE,267    land="#f1f0ed", paper="#fdfdfc", halo=A("#f6f5f3", 0.92), ink="#22211f", ink_soft="#4f4d49", ink_faint="#605e59",268    water="#d9dee1", waterway="#ccd3d7", water_line="#b4bdc2", water_ink="#4a5e69",269    forest="#e6e8e1", grass="#e9ebe5", farmland="#efeeea", wetland="#e3e7e4", rock="#eceae6", sand="#eeece6", scrub="#e7e9e2", glacier="#f7f8f8",270    residential="#f1f0ed", commercial="#f1f0ed", industrial="#ebeae7", airport="#eae9e6", military="#ebeae7", quarry="#e7e6e2", parking="#eeedea",271    school="#f1f0ed", hospital="#f1f0ed", cemetery="#e3e6de",272    park="#e0e5da", park_line="#cdd4c5", golf="#e3e8dd", pitch="#dbe1d4", pitch_line="#cdd4c5", park_ink="#55644f",273    road="#fcfcfb", road_major="#fcfcfb", road_motorway="#fcfcfb", road_service="#f7f6f4",274    road_far="#d3d1cc", road_far_major="#b3b0a9", road_tunnel="#f5f4f2", road_far_tunnel="#dfddd8",275    casing="#d6d4cf", casing_soft="#e0deda", casing_major="#c5c2bc", casing_motorway="#aeaba4", casing_bridge="#8f8c85", casing_tunnel="#e3e1dd",276    path="#c2bfb8", cycleway="#bcc4b6", track="#c2bfb8", rail="#a9a69f", ferry="#9fabb1", transit="#8a877f", transit_ink="#55524c", axis="#a9a69f",277    boundary="#3f3d39", boundary_minor="#6a6863", parcel="#bfbcb5",278    building="#e2e1dd", building_outline="#bdbab3", roof="#f9f9f7", wall="#d4d2cd",279    building_estimated="#eae9e6", building_outline_estimated="#d3d1cc", roof_estimated="#efeeeb", wall_estimated="#e0deda",280    shield="#fdfdfc", shield_stroke="#a9a69f", shield_ink="#4f4d49",281    shield_major="#fdfdfc", shield_major_stroke="#6a6863", shield_major_ink="#22211f",282    poi_education="#4f4d49", poi_health="#4f4d49", poi_commerce="#4f4d49", poi_major="#22211f",283    accent="#7e3320", accent_ink="#ffffff", accent_soft=M("#7e3320", "#f1f0ed", 0.55),284    accent_selected="#22211f", accent_selected_ink="#fdfdfc", accent_sold="#22211f", accent_seen="#74726e", pill_paper="#fdfdfc", pill_line="#fdfdfc",285)286B_FINANCIAL = {287    # Les limites administratives portent la lecture d'un choroplèthe : elles montent d'un cran.288    10: ("boundary-minor", [[11, 0.5], [13, 0.9], [16, 1.4]], [3, 2]),289    8: ("boundary", [[9, 0.5], [11, 1.0], [14, 1.6], [17, 2.2]], None),290    6: ("boundary", [[7, 0.5], [10, 1.2], [14, 1.8]], [8, 2, 1.5, 2]),291    4: ("boundary", [[2, 0.7], [8, 1.5], [14, 2.2]], [10, 2.5, 1.5, 2.5]),292    2: ("boundary", [[0, 0.8], [6, 1.7], [14, 2.6]], None),293}294295# ------------------------------------------------------------------ blueprint : tirage au trait bleu296# La convention est celle du tirage diazo (« bleu ») des bureaux d'architectes : trait bleu de Prusse297# sur papier presque blanc, hiérarchie par l'épaisseur du trait, poché des bâtiments, axes en trait298# mixte, limites de lots en trait mixte à deux points.299BLUEPRINT = {300    "land": "#f2f3ee", "paper": "#fbfbf8", "ink": "#16324f", "ink-soft": "#3c5876", "ink-faint": "#465f7a",301    "halo": A("#f5f6f2", 0.92),302    "water": "#dbe6ec", "waterway": "#7f9bb5", "water-line": "#4f7191", "water-ink": "#23527a",303    "forest": "#e6ece2", "grass": "#eaefe5", "farmland": "#f0f1e8", "wetland": "#e2eae8", "rock": "#eaebe6", "sand": "#eff0e6", "scrub": "#e8ede2",304    "glacier": "#f8fafa",305    "residential": "#f2f3ee", "commercial": "#f2f3ee", "industrial": "#eceee9", "airport": "#ebede9", "military": "#eceee9", "quarry": "#e6e9e3",306    "parking": "#eef0eb", "school": "#f2f3ee", "hospital": "#f2f3ee", "cemetery": "#e2eadf",307    "park": "#dfe9da", "park-line": "#8fa98a", "golf": "#e3ecdd", "pitch": "#d9e5d3", "pitch-line": "#8fa98a", "park-ink": "#3d6040",308    "road": "#fbfbf8", "road-major": "#fbfbf8", "road-motorway": "#fbfbf8", "road-service": "#f6f7f3",309    "road-far": "#b1c0ce", "road-far-major": "#4f6f8f", "road-tunnel": "#f2f3ee", "road-far-tunnel": "#b9c6d2",310    "casing": "#6f89a3", "casing-soft": "#a3b4c5", "casing-major": "#3c5876", "casing-motorway": "#16324f", "casing-bridge": "#16324f",311    "casing-tunnel": "#b9c6d2",312    "path": "#7f97ae", "cycleway": "#7f97ae", "track": "#7f97ae", "rail": "#3c5876", "ferry": "#4f7191", "transit": "#3c5876", "transit-ink": "#16324f",313    "axis": "#8a2f24",314    "boundary": "#16324f", "boundary-minor": "#566f8a", "parcel": "#8a2f24",315    "building": "#cfd9e3", "building-outline": "#16324f", "roof": "#fbfbf8", "wall": "#c9d5e0",316    "building-estimated": "#e9eef1", "building-outline-estimated": "#6f89a3", "roof-estimated": "#edf1f2", "wall-estimated": "#d5dee6",317    "shield": "#fbfbf8", "shield-stroke": "#3c5876", "shield-ink": "#16324f",318    "shield-major": "#16324f", "shield-major-stroke": "#16324f", "shield-major-ink": "#fbfbf8",319    "poi-education": "#16324f", "poi-health": "#8a2f24", "poi-commerce": "#3c5876", "poi-major": "#16324f",320    "accent": "#8a2f24", "accent-ink": "#ffffff", "accent-soft": M("#8a2f24", "#f2f3ee", 0.55),321    "accent-selected": "#16324f", "accent-selected-ink": "#fbfbf8", "accent-selected-line": "@accent",322    "accent-seen": "#617080", "accent-seen-ink": "#ffffff",323    "accent-good": "#0d5f5c", "accent-good-ink": "#ffffff", "accent-high": "#966611", "accent-high-ink": "#ffffff",324    "accent-sold": "#16324f", "accent-sold-ink": "#fbfbf8",325    "pill-paper": "#fbfbf8", "pill-line": "#fbfbf8", "pill-shadow": "#16324f2e",326    **SCALES_LIGHT,327}328B_BLUEPRINT = {329    10: ("boundary-minor", [[12, 0.5], [16, 1.0]], [3, 2]),330    8: ("boundary-minor", [[10, 0.6], [16, 1.4]], [10, 2, 2, 2]),331    6: ("boundary-minor", [[8, 0.6], [14, 1.4]], [12, 2, 2, 2, 2, 2]),332    4: ("boundary", [[2, 0.6], [8, 1.2], [14, 1.8]], [12, 3, 2, 3]),333    2: ("boundary", [[0, 0.8], [6, 1.6], [14, 2.4]], None),334}335336LIGHT_SOFT = {"azimuth": 300, "altitude": 46, "ambient": 0.72, "intensity": 0.46, "color": "#fff4e2", "shadow-strength": 0.24, "shadow-color": "#4a4238"}337TERRAIN_SOFT = {"exaggeration": 1.0, "azimuth": 315, "shadow-color": A("#4a4238", 0.32), "highlight-color": "#ffffff59"}338339THEMES = {340    "signature": {341        "description": "Planche d'atlas : papier chaud, trait d'encre sépia, chaussées blanches entre deux filets, une seule teinte chaude (paille des autoroutes).",342        "palette": SIGNATURE, "boundaries": B_SIGNATURE, "light": LIGHT_SOFT, "terrain": TERRAIN_SOFT, "park_outline": True, "vertical_gradient": 0.16,343        "transit_colour": True,344    },345    "midnight": {346        "description": "Nuit : charbon chaud à faible chroma, eau plus sombre que la terre, lettrage ivoire, rehauts de laiton (stations, cartouches d'autoroute).",347        "palette": MIDNIGHT, "boundaries": B_MIDNIGHT, "park_outline": True, "transit_colour": True, "transit_opacity": 0.6,348        # Volumes de nuit : toits nettement plus clairs que le sol, murs éclairés et murs à l'ombre bien séparés349        # (ambiante plus basse), arête claire au haut des murs — la masse bâtie se lit sans devenir un aplat noir.350        "light": {"azimuth": 300, "altitude": 40, "ambient": 0.46, "intensity": 0.8, "color": "#ffe9c4", "shadow-strength": 0.34, "shadow-color": "#000000"},351        "terrain": {"exaggeration": 1.0, "azimuth": 315, "shadow-color": A("#000000", 0.45), "highlight-color": "#f3e6c81f"},352        "hillshade_opacity": [[5, 0.6], [12, 0.5], [16, 0.15]], "vertical_gradient": 0.34,353        "edges": True, "edge_color": "building-edge", "edge_width": 0.9,354        # Vue d'ensemble (zooms 4 à 8, retour T1) : terre éclaircie de loin, couvert du sol moins appuyé (la forêt, plus355        # sombre que la terre, ramenait tout le territoire à la valeur de l'eau), routes lointaines plus claires ; le356        # liseré de rive ne commence qu'au zoom 8 (à l'échelle de la province il cernait des milliers de lacs).357        "land_far": [[4, "#33312c"], [7, "#2e2c28"], [10, "@land"]],358        "landcover_opacity": [[4, 0.2], [7, 0.35], [10, 0.9], [13, 1.0]],359        "shore": [[3, 0.0], [7.5, 0.0], [9, 0.7], [13, 0.9], [17, 1.1]],360    },361    "city3d": {362        "hatch_always": True,363        "description": "Maquette d'architecte : sol neutre, volumes clairs, lumière rasante douce et ombres portées franches ; s'ouvre incliné.",364        "palette": CITY3D, "boundaries": B_SIGNATURE, "park_outline": True, "transit_colour": True, "transit_opacity": 0.6,365        "defaults": {"mode": "3d", "pitch": 55, "bearing": -20},366        "light": {"azimuth": 305, "altitude": 36, "ambient": 0.64, "intensity": 0.62, "color": "#fff3e0", "shadow-strength": 0.42, "shadow-color": "#4a4854"},367        "terrain": {"exaggeration": 1.2, "azimuth": 315, "shadow-color": A("#3d3a44", 0.34), "highlight-color": "#ffffff66"},368        "vertical_gradient": 0.14, "transit_opacity": 0.45,369        "layer_patches": {"road-label-minor": {"minzoom": 15.5}, "housenum": {"minzoom": 17.5}},370    },371    "minimal": {372        "description": "Fond qui se tait : presque monochrome, sans teinte d'usage du sol, traits légers ; les couches de données portent toute la couleur.",373        "palette": MINIMAL, "boundaries": B_MINIMAL, "poi_zoom": 1.0, "casing_scale": 0.85, "transit_opacity": 0.55,374        "light": {"azimuth": 300, "altitude": 50, "ambient": 0.78, "intensity": 0.34, "color": "#ffffff", "shadow-strength": 0.12, "shadow-color": "#4a4238"},375        "terrain": {"exaggeration": 1.0, "azimuth": 315, "shadow-color": A("#4a4238", 0.18), "highlight-color": "#ffffff40"},376        "hillshade_opacity": [[5, 0.3], [12, 0.25], [16, 0.08]], "vertical_gradient": 0.14,377        "landcover_opacity": [[4, 0.4], [10, 0.8], [13, 1.0]],378        "layer_patches": {"road-label-minor": {"minzoom": 15.5}, "poi-major": {"minzoom": 14.5}, "housenum": {"minzoom": 17.5}},379    },380    "terrain": {381        "description": "Le pays physique : relief ombré, forêts, milieux humides et hydrographie au premier plan ; routes et bâti en retrait, pistes et sentiers lisibles.",382        "palette": TERRAIN, "boundaries": B_SIGNATURE, "park_outline": True, "waterway_scale": 1.5, "road_scale": 1.0, "path_scale": 1.35,383        "light": LIGHT_SOFT,384        "terrain": {"exaggeration": 1.6, "azimuth": 315, "shadow-color": A("#3d3324", 0.5), "highlight-color": "#fffbe680"},385        "hillshade_opacity": [[4, 0.85], [12, 0.75], [16, 0.4]], "hillshade_exaggeration": 1.4, "hillshade_maxzoom": 19,386        "landcover_opacity": [[4, 0.6], [7, 0.8], [10, 1.0]],387        "shore": [[6.5, 0.0], [8, 0.6], [13, 1.0], [17, 1.3]],388        "layer_patches": {"road-track": {"minzoom": 12}, "road-path": {"minzoom": 13.5}, "waterway-small": {"minzoom": 11}, "poi-park": {"minzoom": 13.5}},389    },390    "financial": {391        "hatch_always": True,392        "description": "Fond d'analyse : gris neutre désaturé, limites municipales et de quartier franches, lettrage des secteurs renforcé ; fait pour porter choroplèthes et cartes de chaleur.",393        "palette": FINANCIAL, "boundaries": B_FINANCIAL, "poi_zoom": 0.5, "transit_opacity": 0.6,394        "district_font": "medium", "district_ink": "ink-soft", "suburb_ink": "ink", "street_ink": "ink-soft",395        "light": {"azimuth": 300, "altitude": 52, "ambient": 0.74, "intensity": 0.4, "color": "#ffffff", "shadow-strength": 0.16, "shadow-color": "#33312e"},396        "terrain": {"exaggeration": 1.0, "azimuth": 315, "shadow-color": A("#33312e", 0.2), "highlight-color": "#ffffff40"},397        "hillshade_opacity": [[5, 0.3], [12, 0.22], [16, 0.06]], "vertical_gradient": 0.16,398        "landcover_opacity": [[4, 0.4], [10, 0.8], [13, 1.0]],399        "layer_patches": {"place-neighbourhood": {"minzoom": 12.5}, "place-suburb": {"minzoom": 10.5}},400    },401    "blueprint": {402        "hatch_always": True,403        "edges": True,404        "description": "Tirage au trait : bleu de Prusse sur papier, hiérarchie par l'épaisseur du trait, bâtiments pochés au contour franc, axes en trait mixte rouge, lettrage en capitales.",405        "palette": BLUEPRINT, "boundaries": B_BLUEPRINT, "road_style": "outline", "centerlines": True, "street_caps": True, "park_outline": True,406        "casing_scale": 1.0, "building_outline": [[13, 0.2], [15, 0.8], [17, 1.4], [19, 1.9]], "parcel_minzoom": 15, "parcel_width": [[15, 0.5], [19, 1.1]],407        "light": {"azimuth": 315, "altitude": 50, "ambient": 0.7, "intensity": 0.45, "color": "#ffffff", "shadow-strength": 0.22, "shadow-color": "#16324f"},408        "terrain": {"exaggeration": 1.0, "azimuth": 315, "shadow-color": A("#16324f", 0.25), "highlight-color": "#ffffff40"},409        "hillshade_opacity": [[5, 0.35], [12, 0.3], [16, 0.1]], "vertical_gradient": 0.18, "text_scale": 0.96,410        "shore": [[6.5, 0.0], [8, 0.7], [13, 1.1], [17, 1.5]],411    },412}413
Files main
Menu

Theme