← atelier

landing/art/night.py

night.py: the README quick start, verbatim (shown next to its result on the page)

Render it yourself: atelier render night.py --preview (it imports _common.py for the palette and output folder).

night.py
# night.py: the README quick start, verbatim (shown next to its result on the page)
from atelier import *

c = Canvas(1600, 1000)
c.fill(gradient([(0, "#0b1026"), (0.6, "#3b2a5a"), (1, "#f4a259")]))
c.layer(blend="screen").fill("white", mask=stars(70, seed=3) * top(0.6, soft=0.2))
c.layer().fill_below(ridged(2.2, seed=1).ridge_line(y=0.7, amp=0.15), fbm(6).ramp(["#1b1b2f", "#2e2e4d"]))
c.apply(bloom(0.8, 12), grain(0.03), vignette(0.3))
c.save(__file__[:-3] + ".png")

from _common import out                     # (landing build only: also write it to the site assets)
c.save(out("night.jpg"), quality=90)