Make clients graphics use lighter random colors.
authorKristian Høgsberg <krh@redhat.com>
Mon, 13 Oct 2008 02:58:40 +0000 (22:58 -0400)
committerKristian Høgsberg <krh@redhat.com>
Thu, 6 Nov 2008 15:51:58 +0000 (10:51 -0500)
client.c

index 934c7cd..4654de0 100644 (file)
--- a/client.c
+++ b/client.c
@@ -70,10 +70,10 @@ static void
 set_random_color(cairo_t *cr)
 {
        cairo_set_source_rgba(cr,
-                             (random() % 100) / 99.0,
-                             (random() % 100) / 99.0,
-                             (random() % 100) / 99.0,
-                             (random() % 100) / 99.0);
+                             0.5 + (random() % 50) / 49.0,
+                             0.5 + (random() % 50) / 49.0,
+                             0.5 + (random() % 50) / 49.0,
+                             0.5 + (random() % 100) / 99.0);
 }