1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00

Fix typos (#982)

This commit is contained in:
Ian Manske 2024-11-21 20:51:05 -08:00 committed by GitHub
parent fc1d1989b6
commit dee0e7efcd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 838 additions and 833 deletions

View file

@ -38,7 +38,7 @@ def print_colour [ colour:int ] {
$bg_color + $fg_color + $text + " "
}
let printable_colours = 256
const printable_colours = 256
def print_run [start:int, amount:int] {
$start..<($start + $amount) | each { |i|
@ -62,12 +62,13 @@ def print_blocks [start:int, end:int, block_cols:int, block_rows:int, blocks_per
} | str join
}
print (print_run 0 16) # The first 16 colours are spread over the whole spectrum
print "" # Single line
print (print_blocks 16 123 6 6 3) # 6x6x6 colour cube between 16 and 123 inclusive
print (print_blocks 124 231 6 6 3) # 6x6x6 colour cube between 124 and 231 inclusive
print (print_blocks 232 255 12 2 1) # Not 50, but 24 Shades of Grey
export def main [] {
print (print_run 0 16) # The first 16 colours are spread over the whole spectrum
print "" # Single line
print (print_blocks 16 123 6 6 3) # 6x6x6 colour cube between 16 and 123 inclusive
print (print_blocks 124 231 6 6 3) # 6x6x6 colour cube between 124 and 231 inclusive
print (print_blocks 232 255 12 2 1) # Not 50, but 24 Shades of Grey
}
# bash:
@ -113,7 +114,7 @@ print (print_blocks 232 255 12 2 1) # Not 50, but 24 Shades of Grey
#
# # Uncomment the below for more precise luminance calculations
#
# # # Calculate percieved brightness
# # # Calculate perceived brightness
# # # See https://www.w3.org/TR/AERT#color-contrast
# # # and http://www.itu.int/rec/R-REC-BT.601
# # # Luminance is in range 0..5000 as each value is 0..5

View file

@ -1,5 +1,5 @@
# this script uses foreground ansi index colors to print
# a table of 16 rows by 16 colums where each item is a
# a table of 16 rows by 16 columns where each item is a
# different color
def show_index_colors [] {
let prefix = "38;5;"
@ -24,4 +24,6 @@ def one_liner [] {
}
show_index_colors
export def main [] {
show_index_colors
}