Mon, 28 Apr 2014 18:20:51 +0300
- don't let random colors be too dark (or fully white either for dark backgrounds which use white lines)
src/ldObject.cc | file | annotate | diff | comparison | revisions |
--- a/src/ldObject.cc Mon Apr 28 18:13:20 2014 +0300 +++ b/src/ldObject.cc Mon Apr 28 18:20:51 2014 +0300 @@ -47,7 +47,7 @@ memset (m_coords, 0, sizeof m_coords); chooseID(); g_LDObjects << this; - setRandomColor (QColor::fromRgb (rand())); + setRandomColor (QColor::fromHsv (rand() % 360, rand() % 256, rand() % 96 + 128)); } // =============================================================================