Sky & clouds

By default a landscape is transparent above the ridges and the element's background is the sky. Turn on sky and ridgescape draws one: the palette's gradient, and optionally a sun or moon and stars. clouds adds rows of clouds between the sky and the ridges.

{ seed: 7, palette: "alpine", sky: { sun: true }, clouds: true, layers: [{ profile: "peaks" }, {}, {}] }

Sky

sky: true                              // just the palette's gradient
sky: {
  gradient: ["#8fb6d8", "#eaf3f9"],    // or false for none (sun, moon and stars only)
  sun: { at: ["72%", "28%"], radius: 56, glow: 0.6, color: "#fffbe8" },
  moon: { at: ["24%", "22%"], radius: 36, glow: 0.35, crescent: 0.5 },
  stars: { density: 1, size: 1, area: "70%", color: "#ffffff" },
}
FieldDefaultMeaning
atsun ["72%", "28%"], moon ["24%", "22%"]Centre: x from the left, y from the top, in px or %.
radiussun 56, moon 36px.
glowsun 0.6, moon 0.350–1: a soft radial halo. 0 for a plain disc.
crescent0Moon only: 0 full to 1 a thin sliver.
colorthe palette's sunDisc and glow colour.
stars.density1Stars per 100 × 100 px; they thin out toward the bottom of area.
{ palette: "night", sky: { moon: { crescent: 0.55 }, stars: true },
  clouds: { style: "streaks", cover: 0.3, opacity: 0.7 } }

With parallax, the gradient stays put (moving it would uncover its edge), while the sun, moon and stars are as far away as anything: they sink slowly as the page scrolls.

Clouds

clouds: true
clouds: {
  style: "puffy",        // or "streaks": long thin wisps
  bands: 2,              // rows, from the back (high, small, hazy) to the front
  cover: 0.4,            // 0–1: how much of each row is cloud
  top: "14%",            // base of the highest row, from the top
  bottom: "40%",         // base of the lowest row
  size: 240,             // typical cloud width in the front row, px
  shade: 0.2,            // darker undersides
  opacity: 0.92,
  color: "#ffffff",      // default: the palette's cloud colour
  seed: "sky",
}

Each row is one path that repeats horizontally, like the ground, so clouds never stretch. Puffy clouds are a flat base with round puffs on top, drawn as a single filled shape, so overlapping puffs don't darken where they meet. Rows have depths from 1 to 0.85, so they drift with parallax like distant mountains.

Palettes have a sun and a cloud colour; your own palette can set them too, or leave them to be derived from the haze.