I don't fully understand what your question is, but in order to make your colors more visible, you could restrict yourself to the darker range of RGB, like so:
setCurveColor
(QColor( qrand
() % 126, qrand
() % 126, qrand
() % 126 ) );
setCurveColor(QColor( qrand() % 126, qrand() % 126, qrand() % 126 ) );
To copy to clipboard, switch view to plain text mode
You might want to consider sampling in HSV space instead of RGB, which gives you an better interface to colors of full saturation, say
int h = rand*359;
int s = 255;
int v = 128 + rand*127;
return QColor::fromHsv(h,s,v
);
int h = rand*359;
int s = 255;
int v = 128 + rand*127;
return QColor::fromHsv(h,s,v);
To copy to clipboard, switch view to plain text mode
If you want to keep your colors past an exit of the application, you will have to write the colors to a file and load them when the application starts.
QSettings seems to be best fitting for that.
Bookmarks