ansi substitution - luxembourg/muxcode-clm GitHub Wiki

ANSI SUBSTITUTION

The ANSI percent substitutions (%x, %X, %c, and %C) can be used instead of ansi(), and they are more efficient. For example, the equivalent to '[ansi(rBf,Color!)]' would be: '%xr%xB%xfColor!%xn'. The %xn (return to normal) is understood and therefore optional.

%x is equivalent to %c, and %X is equivalent to %C, however, translate() always produces sequences of %x and %X. So, %x and %X are 'preferred'.

The color code following %x or %X can be:

Single letter (%xb, %xc, %xf, %xg, %xh, %xi, %xm, %xn, %xr, %xu, %xw, %xx, %xy, %xB, %xC, %xG, %xM, %xR, %xW, %xX, and %xY)

HTML color code (%x<#RRGGBB> or %x<#000000> through %x<#FFFFFF>)

RGB decimal vector (%x<R G B> or %x<0 0 0> through %x<255 255 255>)

Red, Green, and Blue are abbreviated as R, G, and B.

For the single-letter form, the case of the letter determines whether the color specifies foreground (lower-case) or background (upper-case). For the HTML and decimal-vector forms, the case of the %x or %X determines whether the specified color is foreground or background.

Related Topics: ansi, ANSI CODES, COLOR256, translate

⚠️ **GitHub.com Fallback** ⚠️