[QGIS-Developer] Broken 'randomness' for new layer styles?

Nyall Dawson nyall.dawson at gmail.com
Fri Feb 2 20:17:45 PST 2018


On 2 February 2018 at 21:52, Richard Duivenvoorde <rdmailings at duif.net> wrote:
> Somebody (Raymond ;-) ) 'complained' to me that running a processing
> algorithm everytime comes up with an (ugly) brown style.

I've noticed this too - but had assumed it was just some setting I'd
changed locally. It's fixed by https://github.com/qgis/QGIS/pull/6254

BUT

Coincidentally, Mathieu and I have been speaking this week about
approaches to improve the random colors picked for layers. We came up
with a similar approach:

- find a palette of ~100 colors which we think look good for layers,
and remove gross colors from this
- include this palette as an additional pre-installed color palette
within the standard QGIS install
- on startup, pick a random starting color from this list and a random
direction (forward or backward). When adding layers, grab this color
for the layer and then jump to the next/previous color in the preset
palette for the next layer added.
- (for 3.2 : allow users to pick which palette to use for new layer colors)

How's this sound? I'd love to address this for 3.0 - our default
random color selection often picks yuck colors, and I think it'd be
great if 3.0 "magically" produced nicer looking maps for users without
any work required by them!

Nyall


More information about the QGIS-Developer mailing list