From 96935f2682fd4f85c63ce29019640a1345340110 Mon Sep 17 00:00:00 2001 From: Mikkel Oscar Lyderik Date: Mon, 25 Jan 2016 01:10:41 +0100 Subject: [PATCH] Fix colors off by one --- swaybar/render.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/swaybar/render.c b/swaybar/render.c index bac44075..369fa046 100644 --- a/swaybar/render.c +++ b/swaybar/render.c @@ -17,10 +17,10 @@ static int ws_spacing = 1; static void cairo_set_source_u32(cairo_t *cairo, uint32_t color) { cairo_set_source_rgba(cairo, - ((color & 0xFF000000) >> 24) / 256.0, - ((color & 0xFF0000) >> 16) / 256.0, - ((color & 0xFF00) >> 8) / 256.0, - (color & 0xFF) / 256.0); + ((color & 0xFF000000) >> 24) / 255.0, + ((color & 0xFF0000) >> 16) / 255.0, + ((color & 0xFF00) >> 8) / 255.0, + (color & 0xFF) / 255.0); } /**