Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3b1c395
init 256 colour script
tmck-code Nov 10, 2024
294ad52
update
tmck-code Nov 10, 2024
89c0f42
update
tmck-code Nov 10, 2024
3710fb3
update
tmck-code Nov 10, 2024
965e047
update
tmck-code Nov 10, 2024
a958f06
update
tmck-code Nov 10, 2024
d534ccb
update
tmck-code Nov 10, 2024
7685cbd
update
tmck-code Nov 10, 2024
be473f9
update
tmck-code Nov 11, 2024
c4b4b9c
update
tmck-code Nov 11, 2024
97dba21
update
tmck-code Nov 11, 2024
354bf86
update
tmck-code Nov 11, 2024
c142ee4
update
tmck-code Nov 12, 2024
e0221e0
update
tmck-code Nov 12, 2024
8dfac91
update
tmck-code Nov 12, 2024
f48ab57
update
tmck-code Nov 12, 2024
cd41a98
update
tmck-code Nov 12, 2024
37f4ff4
update
tmck-code Nov 12, 2024
e79efc6
update
tmck-code Nov 12, 2024
720e7d8
update
tmck-code Nov 12, 2024
a24e556
update
tmck-code Nov 13, 2024
59db458
refactor update
tmck-code Nov 14, 2024
9f66c2a
Merge branch 'init' of github.com:tmck-code/pp into init
tmck-code Nov 14, 2024
4b376f6
remove pycache files
tmck-code Nov 14, 2024
ea55226
update
tmck-code Nov 14, 2024
0ee3bb6
update
tmck-code Nov 14, 2024
cc31bbc
update
tmck-code Nov 14, 2024
1642436
update
tmck-code Nov 18, 2024
427eb89
update
tmck-code Nov 18, 2024
a369808
update
tmck-code Nov 18, 2024
3697fe0
update
tmck-code Nov 18, 2024
29da370
update
tmck-code Nov 18, 2024
8ea3e0d
update
tmck-code Nov 18, 2024
fdbded5
update
tmck-code Nov 18, 2024
07b8fc8
update
tmck-code Nov 18, 2024
fd37551
update
tmck-code Nov 19, 2024
d1e94d9
update
tmck-code Nov 19, 2024
c819098
rearrange subdirs
tmck-code Nov 26, 2024
4160f83
move bins to bin
tmck-code Dec 9, 2024
4e0ac3a
logging utility (standard lib _only_!)
tmck-code Dec 9, 2024
2828c45
update
tmck-code Dec 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pycache__
30 changes: 30 additions & 0 deletions bin/conv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env python3

from pp.colour import c, gradient

for i in range(16, 232):
cell = c.from_ansi(i)
print(f'{i:3d} {str(cell.rgb):>16s}', cell.colorise(' '*8))

print('\n'+'~'*80+'\n')

coll = gradient.RGBCubeCollection({
'bgr': gradient.RGBCube.from_ranges('b', 'g', 'r'),
'rgb': gradient.RGBCube.from_ranges('r', 'g', 'b'),
'grb': gradient.RGBCube.from_ranges('g', 'r', 'b'),
})
coll.print(padding_top=0, padding_bottom=1, cell_width=15)

for k in ('rgb', 'grb', 'bgr'):
print('\n'+'~'*80+'\n'+k)
for rot in range(4):
f1 = coll.cubes[k].faces.faces[0][0].rot90(rot, flip=True)
f1.print(padding_top=0, padding_bottom=1, cell_width=15)
print()

gradient.create_cube(
f1=f1,
f1_name=k,
cube_collection=coll
)
input()
Loading