viscal

cairo/gtk vi-like timeblocking calendar
git clone git://jb55.com/viscal
Log | Files | Refs | README | LICENSE

commit 05a1f5cb46f96fe875585154773a6eb234ee45e9
parent 49cd98fb49aac77490e8c0d80fce9f369d2a2cca
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 19 Nov 2021 14:41:06 -0800

fix saturation name

Diffstat:
Mviscal.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/viscal.c b/viscal.c @@ -2222,7 +2222,7 @@ format_time_duration(char *buf, int bufsize, int seconds) #define Pr .299 #define Pg .587 #define Pb .114 -static void saturate(union rgba *c, double change) +static void desaturate(union rgba *c, double change) { double P=sqrt( (c->r)*(c->r)*Pr+ @@ -2234,7 +2234,7 @@ static void saturate(union rgba *c, double change) c->b = P+((c->b)-P)*change; } -static void desaturate(union rgba *c, double change) +static void saturate(union rgba *c, double change) { double L = Pr * c->r + Pg * c->g + @@ -2264,7 +2264,7 @@ draw_event_summary(cairo_t *cr, struct cal *cal, time_t st, time_t et, char *end_time; time_t len = et - st; - //saturate(&color, 0.8); + //desaturate(&color, 0.8); double c = 0.9; color.r = c; color.g = c; @@ -2340,7 +2340,7 @@ draw_event (cairo_t *cr, struct cal *cal, struct event *ev, struct event *sel, struct event *target) { union rgba c = ev->ical->color; - saturate(&c, 0.4); + desaturate(&c, 0.4); int is_locked = ev->flags & EV_IMMOVABLE; int is_dragging = target == ev && (cal->flags & CAL_DRAGGING);