mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-02 15:17:47 +00:00
Add files via upload
This commit is contained in:
parent
2fcb9d9a87
commit
f1ef31b4a2
1 changed files with 23 additions and 0 deletions
23
engine-q/coloring/gradient.py
Normal file
23
engine-q/coloring/gradient.py
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# this script will print a blue gradient on the screen
|
||||||
|
|
||||||
|
# First:
|
||||||
|
# pip install ansicolors
|
||||||
|
|
||||||
|
from colors import *
|
||||||
|
|
||||||
|
height = 40
|
||||||
|
width = 160
|
||||||
|
stamp = "py"
|
||||||
|
|
||||||
|
for line in range(0, height):
|
||||||
|
row_data = ""
|
||||||
|
|
||||||
|
for col in range(0, width):
|
||||||
|
fgcolor = 2 + 2 * col
|
||||||
|
if fgcolor > 200 and fgcolor < 210:
|
||||||
|
row_data = row_data + color(stamp, bg='rgb(0, 0, %d)' % fgcolor)
|
||||||
|
else:
|
||||||
|
fg = fgcolor % 256
|
||||||
|
row_data = row_data + color(' ', bg='rgb(0, 0, %d)' % fg)
|
||||||
|
|
||||||
|
print(row_data)
|
Loading…
Add table
Add a link
Reference in a new issue