Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/Textualize/rich
/ RainbowHighlighter
Class
RainbowHighlighter
examples/rainbow.py:13–16 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
11
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
1
rainbow.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected