mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 14:47:47 +00:00
commit
4eb7ff891c
3 changed files with 21 additions and 8 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.DS_Store
|
|
@ -1,8 +1,7 @@
|
|||
let term_cols = ((term size -w) - 1)
|
||||
|
||||
# let's itertate through each of the columns of our terminal
|
||||
echo 0..$term_cols |
|
||||
each { |col|
|
||||
for col inc 0..$term_cols {
|
||||
let r = (255 - ($col * 255 / $term_cols) | math round)
|
||||
let g = ($col * 510 / $term_cols | math round)
|
||||
let b = ($col * 255 / $term_cols | math round)
|
||||
|
|
|
@ -10,13 +10,26 @@
|
|||
# done
|
||||
# echo ""
|
||||
|
||||
echo 0..8 | each { |style|
|
||||
let row = (echo 30..37 | each { |fg|
|
||||
let row = (echo 40..47 | each { |bg|
|
||||
let color = $"($style);($fg);($bg)m"
|
||||
$"(ansi -e $color)($color)(ansi reset) "
|
||||
# Nushell 0.32.0
|
||||
for x in 0..8 {
|
||||
let row = (for i in 30..37 {
|
||||
let row = (for a in 40..47 {
|
||||
let color = $"($x);($i);($a)"
|
||||
$"(ansi -e $color)m\e[($color)(ansi -e '0;37;40')m "
|
||||
} | str collect)
|
||||
$"($row)(char newline)"
|
||||
} | str collect)
|
||||
$"($row)(char newline)"
|
||||
} | str collect
|
||||
} | str collect
|
||||
|
||||
# Nushell 0.31.0
|
||||
# echo 0..8 | each { |style|
|
||||
# let row = (echo 30..37 | each { |fg|
|
||||
# let row = (echo 40..47 | each { |bg|
|
||||
# let color = $"($style);($fg);($bg)m"
|
||||
# $"(ansi -e $color)($color)(ansi reset) "
|
||||
# } | str collect)
|
||||
# $"($row)(char newline)"
|
||||
# } | str collect)
|
||||
# $"($row)(char newline)"
|
||||
# } | str collect
|
Loading…
Add table
Add a link
Reference in a new issue