Abstract
The choice of suitable color palettes is a central task in thematic cartography. Established palette libraries such as ColorBrewer 2.0 provide cartographically proven color schemes, but they account only to a limited extent for the specific visual context of a background map. Particularly in web-based mapping environments, basemaps vary widely in lightness, colorfulness, texture, and semantic density. This paper introduces CartoPalette v4.2, a basemap-dependent tool for generating thematic color palettes. The system combines a trained Conditional Variational Autoencoder model (CVAE) with explicit scoring, minimum domain checks, constrained reranking, and optional CIELAB-color-space-based repair. The goal is not the automation of cartographic design, but a transparent, traceable decision aid. The benchmark comprised 40 basemaps from held-out test locations, drawn from the ten map styles included in the training data, together with two palette types and four class counts. In this setting, 90% of CartoPalette’s suggestions scored higher than the corresponding best available ColorBrewer palette. In about 83% of cases, the visual contrast to the background map was greater than with ColorBrewer. The results show that explicitly incorporating the basemap context offers a clear added value over classical palette libraries. These findings therefore refer to previously unseen locations within basemap styles represented during training. Transfer to entirely new styles has not yet been evaluated.