[Remind-Fans] colorizing caldendars
David F. Skoll
dfs at roaringpenguin.com
Sun Apr 29 14:31:48 EDT 2012
On Sun, 29 Apr 2012 18:22:26 +0200
Ruthard Baudach <ruthard.baudach at web.de> wrote:
> I'd like to colorize the Remind message with ANSI Escape sequences, as
> proposed in the examples directory of the remind source.
You can use the SPECIAL COLOR for that. For example:
REM Wed SPECIAL COLOR 0 0 160 This is BLUE
will produce a blue calendar entry when run via:
rem -clc
See the source code "src/calendar.c" (specifically, the "Colorize"
function) for the algorithm Remind uses to map RGB triplets to ANSI
escape sequences.
Short version: If any of R, G or B component is greater than 64, that
component is "on". If any is greater than 128, then the result is considered
"bright". The 16 combinations of "bright", "red-on", "green-on" and
"blue-on" are mapped to 16 corresponding ANSI escape sequences.
Regards,
David.
More information about the Remind-fans
mailing list