Feature request #2116

avoid black and white from default colors

Added by Paolo Cavallini over 7 years ago. Updated over 1 year ago.

Status:Closed
Priority:Low
Assignee:-
Category:Symbology
Pull Request or Patch supplied:No Resolution:fixed/implemented
Easy fix?:No

Description

When loading a vector, random colors are assigned; it seems appropriate avoiding both black and white, as white can be confused with background, and black is the default color for outline. Same for random colors in classifications

History

#1 Updated by Giovanni Manghi over 5 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#2 Updated by Giovanni Manghi about 5 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

#3 Updated by Pirmin Kalberer over 4 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

#4 Updated by Médéric RIBREUX over 1 year ago

  • Assignee deleted (nobody -)
  • Pull Request or Patch supplied set to No
  • Status changed from Open to Closed
  • Resolution set to fixed/implemented
  • % Done changed from 0 to 100

Hello, bug triage...

after digging into the code, I've found the default color symbol affectation (on core/symbology-ng/qgssymbolv2.cpp):

s->setColor( QColor::fromHsv( qrand() % 360, 64 + qrand() % 192, 128 + qrand() % 128 ) );

The saturation can't be inferior to 64 (avoid color to be too white) and the value can't be inferior to 128 (avoiding too dark colors).

I am closing this old one !

Also available in: Atom PDF