Manual fixes to Python file
To see if I like the rules
This commit is contained in:
parent
34b545890d
commit
8179433c41
10 changed files with 612 additions and 547 deletions
|
@ -1,3 +1,8 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i python3 --pure
|
||||
#! nix-shell -p python3 python3Packages.colorspacious python3Packages.numpy
|
||||
# vim: filetype=python
|
||||
|
||||
import argparse
|
||||
import json
|
||||
|
||||
|
@ -90,14 +95,14 @@ if args.polarity == "light":
|
|||
frogarized_rgb = np.vstack([frogarized_rgb[7::-1], frogarized_rgb[8:]])
|
||||
|
||||
# Output
|
||||
palette = dict()
|
||||
palette = {}
|
||||
for i in range(16):
|
||||
rgb = frogarized_rgb[i]
|
||||
r, g, b = rgb
|
||||
hex = f"#{r:02x}{g:02x}{b:02x}"
|
||||
palette[f"base{i:02X}"] = hex
|
||||
hexa = f"#{r:02x}{g:02x}{b:02x}"
|
||||
palette[f"base{i:02X}"] = hexa
|
||||
if args.output == "truecolor":
|
||||
print(f"\033[48;2;{r};{g};{b}m{hex}\033[0m") # ]]
|
||||
print(f"\033[48;2;{r};{g};{b}m{hexa}\033[0m") # ]]
|
||||
# treesitter is silly and will consider brackets in strings
|
||||
# as indentation, hence the comment above
|
||||
if args.output == "json":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue