2023-07-21 18:16:27 +03:00
|
|
|
# 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)
|
|
|
|
|
|
|
|
const height = 40
|
|
|
|
const width = 160
|
|
|
|
const stamp = "Nu"
|
|
|
|
|
|
|
|
for line in 0..$height {
|
|
|
|
mut row_data = ""
|
|
|
|
|
|
|
|
for col in 0..$width {
|
|
|
|
let fgcolor = 2 + 2 * $col
|
|
|
|
|
2022-12-08 02:52:10 +03:00
|
|
|
if $fgcolor > 200 and $fgcolor < 210 {
|
2023-07-21 18:16:27 +03:00
|
|
|
$row_data += $"(ansi -e '48;2;0;0;')($fgcolor)m($stamp)(ansi -e '0m')"
|
2022-02-25 22:10:38 +03:00
|
|
|
} else {
|
2023-07-21 18:16:27 +03:00
|
|
|
let fg = $fgcolor mod 256
|
|
|
|
$row_data += $"(ansi -e '48;2;0;0;')($fg)m (ansi -e '0m')"
|
2021-01-23 21:17:44 +03:00
|
|
|
}
|
2023-07-21 18:16:27 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
print $row_data
|
|
|
|
}
|