Lines Matching refs:color
28 -- $FreeBSD: stable/11/stand/lua/color.lua 360597 2020-05-03 03:54:49Z kevans $
34 local color = {}
37 color.disabled = not color.isEnabled()
41 color.BLACK = 0
42 color.RED = 1
43 color.GREEN = 2
44 color.YELLOW = 3
45 color.BLUE = 4
46 color.MAGENTA = 5
47 color.CYAN = 6
48 color.WHITE = 7
50 color.DEFAULT = 9
51 color.BRIGHT = 1
52 color.DIM = 2
54 function color.isEnabled()
62 function color.escapefg(color_value)
63 if color.disabled then
69 function color.resetfg()
70 if color.disabled then
73 return color.escapefg(color.DEFAULT)
76 function color.escapebg(color_value)
77 if color.disabled then
83 function color.resetbg()
84 if color.disabled then
87 return color.escapebg(color.DEFAULT)
90 function color.escape(fg_color, bg_color, attribute)
91 if color.disabled then
103 function color.default()
104 if color.disabled then
107 return color.escape(color.DEFAULT, color.DEFAULT)
110 function color.highlight(str)
111 if color.disabled then
114 -- We need to reset attributes as well as color scheme here, just in
122 return color