-
Notifications
You must be signed in to change notification settings - Fork 0
/
colortest.fndr
65 lines (61 loc) · 1.42 KB
/
colortest.fndr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env fender
# SPDX-FileCopyrightText: 2023 Eli Array Minkoff
#
# SPDX-License-Identifier: GPL-3.0-only
$esc = '\u001B'
$i = 0
$ii = 0
# Print the first 16 colors - these vary by terminal configuration
println("")
while({i < 16}, {
print(esc, "[48;5;", i, "m ")
i = i + 1
}
)
println(esc, "[0m\n")
# Print the 6 sides of the color cube - these are more standardized
# but the order is a bit odd, thus the need for this trickery
i = 16; while({i < 52}, {
ii = 0; while({ii < 6}, {
print(esc, "[48;5;", i+ii, "m ")
ii = ii + 1
})
print(esc, "[0m ")
ii = 36; while({ii < 42}, {
print(esc, "[48;5;", i+ii, "m ")
ii = ii + 1
})
print(esc, "[0m ")
ii = 72; while({ii < 78}, {
print(esc, "[48;5;", i+ii, "m ")
ii = ii + 1
})
println(esc, "[0m")
i = i + 6
})
println("")
i = 124; while({i < 160}, {
ii = 0; while({ii < 6}, {
print(esc, "[48;5;", i+ii, "m ")
ii = ii + 1
})
print(esc, "[0m ")
ii = 36; while({ii < 42}, {
print(esc, "[48;5;", i+ii, "m ")
ii = ii + 1
})
print(esc, "[0m ")
ii = 72; while({ii < 78}, {
print(esc, "[48;5;", i+ii, "m ")
ii = ii + 1
})
println(esc, "[0m")
i = i + 6
})
println("")
# Finally, the 24 grays
i = 232; while({i < 256}, {
print(esc, "[48;5;", i, "m ")
i = i + 1
})
println(esc, "[0m\n")