Skip to content

Commit

Permalink
9
Browse files Browse the repository at this point in the history
  • Loading branch information
villares committed Dec 10, 2024
1 parent 9ad422d commit 78cf1b1
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
Binary file added 2024/sketch_2024_12_09/sketch_2024_12_09.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions 2024/sketch_2024_12_09/sketch_2024_12_09.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import py5



def setup():
py5.size(400, 400)
N = 7
w = py5.width / N
h = py5.height / 3
py5.color_mode(py5.HSB)
y = 0
colors = [py5.color(10 + 255 / N * i, 255 , 255) for i in range(N)]
for i, c in enumerate(colors):
x = i * w
py5.fill(c)
py5.rect(x, y, w, h)
y += h
w = py5.width / N
colors = [py5.color(255 / N * i, 255 , 255) for i in range(N)]
for i, c in enumerate(colors):
x = i * w
py5.fill(c)
py5.rect(x, y, w, h)
y += h
N = 6
w = py5.width / N
colors = [py5.color(255 / N * i, 255 , 255) for i in range(N)]
for i, c in enumerate(colors):
x = i * w
py5.fill(c)
py5.rect(x, y, w, h)

py5.save('out.png')

py5.run_sketch()
10 changes: 10 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ Here are listed some of the tools I have been using more recently:
2024 \| [<b>2023</b>](2023.md) \| [<b>2022</b>](2022.md) \| [<b>2021</b>](2021.md) \| [<b>2020</b>](2020.md) \| [<b>2019</b>](2019.md) \| [<b>2018</b>](2018.md)


---

### sketch_2024_12_09

![sketch_2024_12_09](https://raw.githubusercontent.com/villares/sketch-a-day/main/2024/sketch_2024_12_09/sketch_2024_12_09.png)

[sketch_2024_12_09](https://github.com/villares/sketch-a-day/tree/main/2024/sketch_2024_12_09) [[py5](https://py5coding.org/)]



---

### sketch_2024_12_08
Expand Down

0 comments on commit 78cf1b1

Please sign in to comment.