Module m_colours
Documentation for the modules-m_colours module in /std/modules/m_colours.c.
Functions
-
string terminal_mode()
Returns “xterm”, “ansi”, or “vt100” or nothing if the user has turned colours off.
-
int colour_strlen(string str)
Gives the length of the visible portion of s. Colour codes (e.g. %^GREEN%^ <123>) are ignored.
-
string colour_truncate(string str, int len)
Returns a string which consists of len or fewer visible characters, not counting colour codes.
-
string use_colour(string *cols, int position, int width)
Returns the colour in the colour array, cols, to use given the position out of the width (typically screen width).
-
string gradient_string(string str, string *cols)
Given a string, spread the colour array equally over the string length. Example:
gradient_string(“Hello world”,({“118”,”119”,”120”,”121”,”122”,”123”}))
File generated by Lima 1.1a4 reStructured Text daemon.