Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
COLOR.LUA(8)		  BSD System Manager's Manual		  COLOR.LUA(8)

NAME
     color.lua -- FreeBSD color	module

DESCRIPTION
     color.lua contains	functionality for working with colors.

     Before using the functionality provided by	color.lua, it must be included
     with a statement such as the following:

	   local color = require("color")

     The following color constants are exported	from color.lua:

	   color.BLACK

	   color.RED

	   color.GREEN

	   color.YELLOW

	   color.BLUE

	   color.MAGENTA

	   color.CYAN

	   color.WHITE

     The following attribute constants are exported from color.lua:

	   color.DEFAULT

	   color.BRIGHT

	   color.DIM

     The following functions are exported from color.lua:

	   color.isEnabled()   Returns True if loader(8) has been configured
			       to not allow color, False otherwise.  This
			       checks the loader_color loader.conf(5) vari-
			       able, along with	core.isSerialBoot().

	   color.escapefg(color_value)
			       Returns the escape sequence that	encodes
			       color_value as a	foreground color.
			       color.escapefg()	returns	an empty string	if
			       color is	disabled.

	   color.resetfg()     Returns the escape sequence for the default
			       foreground color.  color.resetfg() returns an
			       empty string if color is	disabled.

	   color.escapebg(color_value)
			       Returns the escape sequence that	encodes
			       color_value as a	background color.
			       color.escapebg()	returns	an empty string	if
			       color is	disabled.

	   color.resetbg()     Returns the escape sequence for the default
			       background color.  color.resetbg() returns an
			       empty string if color is	disabled.

	   color.escape(fg_color, bg_color, attribute)
			       Returns an escape sequence that encodes
			       fg_color	as the foreground color, bg_color as
			       the background color, and attribute applied.
			       color.escape() returns an empty string if color
			       is disabled.

	   color.default()     Returns the escape sequence for the default
			       color scheme, white on black with no attributes
			       applied.	 color.default() returns an empty
			       string if color is disabled.

	   color.highlight(str)
			       Returns str with	the color.BRIGHT attribute ap-
			       plied before it and reset after it.
			       color.highlight() returns str if	color is dis-
			       abled.

SEE ALSO
     screen.lua(8)

AUTHORS
     The color.lua file	was originally written by Pedro	Souza
     <pedrosouza@FreeBSD.org>.	Later work and this manual page	was done by
     Kyle Evans	<kevans@FreeBSD.org>.

BSD				August 19, 2018				   BSD

NAME | DESCRIPTION | SEE ALSO | AUTHORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=color.lua&sektion=8&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help