Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/Textualize/rich
/ highlight
Method
highlight
examples/rainbow.py:14–16 ·
view source on GitHub ↗
(self, text)
Source
from the content-addressed store, hash-verified
12
13
class
RainbowHighlighter(Highlighter):
14
def
highlight(self, text):
15
for
index in range(len(text)):
16
text.stylize(f
"color({randint(16, 255)})"
, index, index + 1)
17
18
19
rainbow = RainbowHighlighter()
Callers
nothing calls this directly
Calls
1
stylize
Method · 0.80
Tested by
no test coverage detected