On Sun, 29 Apr 2012 18:22:26 +0200
Ruthard Baudach <[email protected]> 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.
_______________________________________________
Remind-fans mailing list
[email protected]
http://lists.roaringpenguin.com/cgi-bin/mailman/listinfo/remind-fans
Remind is at http://www.roaringpenguin.com/products/remind

Reply via email to