Skip to content

colordepth()

colordepth(<player|descriptor>)

Returns the colour depth a connection is sent:

DepthColour
0none, or highlight only
4the sixteen ANSI colours
8the 256 xterm colours
24full colour

It reads the same colour style as terminfo(), which takes the client and the player’s ANSI, COLOR, XTERM256 and TRUECOLOR flags into account. A player with more than one connection answers for the least idle one. Only the player on the connection and objects with See_All may ask.

colordepth() comes from TinyMUX, where 24 means a player with the HTML flag; here it means 24-bit colour.

> think colordepth(me)
8

Output: a client that draws 256 colours.

::: seealso