If you want some simple code to make a palette suitable for color-coding, look at gnome-desktop/libgnome-desktop/gnome-rr-labeler.c:make_palette(). That function makes a simple palette of light pastel colors based on a number of desired items (labeler->num_outputs in that code).
If you want some simple code to make a palette suitable for color-coding, look at gnome-desktop/ libgnome- desktop/ gnome-rr- labeler. c:make_ palette( ). That function makes a simple palette of light pastel colors based on a number of desired items (labeler- >num_outputs in that code).