7 namespace frechet {
namespace view {
36 if (col.hslSaturationF() < 0.5)
43 if (col.hslSaturationF() > 0.5)
51 col.setHslF(col.hslHueF(), col.hslSaturationF()+diff, col.lightnessF(), col.alphaF());
68 static QColor
toColor(
int x,
int sat=220,
int light=200);
void weaker(QColor &col)
make the color a lighter saturation
global definitions for all algorithms.
void addLightness(QColor &col, double diff)
modify the lightness of a color
QColor nextColor(size_t key)
get color for a component; chose a new random color, if necessary
void clear()
remove all entries from the map
void stronger(QColor &col)
make the color a darker saturation
QMap< size_t, QColor > ColorMap
maps component IDs to random colors
QColor operator[](size_t key)
look up a color
static QColor toColor(int x, int sat=220, int light=200)
map an integer key to a color
Palette()
constructor; creates an empty palette