Update color/README.md

This commit is contained in:
2024-12-24 06:43:33 +00:00
parent c48b9f73da
commit 8ef1bdb65b

View File

@@ -1,4 +1,4 @@
```python
for i, c in enumerate('RGYBMC'): globals()[c] = lambda s, i=i: f'\x1b[{91+i}m{s}\x1b[0m'
print(R('hello'), G('world'))
for i,x in enumerate('rgybmcRGYBMC'):globals()[x]=lambda s,i=i:f'\x1b[{31+i//6*60+i%6}m{s}\x1b[0m'
print(r('hello'), R('hello'))
```