forked from capnspacehook/impulse-wars
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtexture.py
More file actions
37 lines (28 loc) · 861 Bytes
/
texture.py
File metadata and controls
37 lines (28 loc) · 861 Bytes
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
import numpy as np
PUFF_BG = (6, 24, 24)
PUFF_CYAN = (0, 187, 187)
PUFF_RED = (187, 0, 0)
PUFF_YELLOW = (160, 160, 0)
PUFF_GREEN = (0, 187, 0)
img = np.zeros((256, 256, 3), dtype=np.uint8)
img[:] = PUFF_BG
b = 4
img[:128, :b] = PUFF_CYAN
img[:128, 128-b:128] = PUFF_CYAN
img[:b, :128] = PUFF_CYAN
img[128-b:128, :128] = PUFF_CYAN
img[:128, 128:128+b] = PUFF_RED
img[:128, 256-b:256] = PUFF_RED
img[:b, 128:256] = PUFF_RED
img[128-b:128, 128:256] = PUFF_RED
img[128:256, :b] = PUFF_YELLOW
img[128:256, 128-b:128] = PUFF_YELLOW
img[128:128+b, :128] = PUFF_YELLOW
img[256-b:256, :128] = PUFF_YELLOW
img[128:256, 128:256] = (0, 40, 0)
img[128:256, 128:128+b] = PUFF_GREEN
img[128:256, 256-b:256] = PUFF_GREEN
img[128:128+b, 128:256] = PUFF_GREEN
img[256-b:256, 128:256] = PUFF_GREEN
from PIL import Image
Image.fromarray(img).save('../docker/texture.png')