Rainglow: a demo of Eleventy Serverless

After a stream with Ben Myers a few weeks back in which we built a color contrast checker using Eleventy Serverless (and to prepare for an upcoming talk at the Eleventy Meetup), I wanted another crack at the use case: to build a site with individua…


This content originally appeared on Zach Leatherman and was authored by Zach Leatherman

After a stream with Ben Myers a few weeks back in which we built a color contrast checker using Eleventy Serverless (and to prepare for an upcoming talk at the Eleventy Meetup), I wanted another crack at the use case: to build a site with individually addressable URLs for every color. It’s an awesome demo—a huge sample space that’s not feasible for build-time generation. Even if you limited the space to hex color formats only (without transparency), that’d be 16 million colors and 16 million pages.

…there are 24 bits used to specify a web color within the sRGB gamut, and 16,777,216 colors that may be so specified.—Web colors, Wikipedia

Eleventy Serverless is well suited for this use case, it can accept wildcard slugs via the URL and generates pages based on that input at run-time instead of build time:

---
permalink:
serverless: "/:color/"
---

Without further ado, here’s where the project (code named Rainglow) landed:

A screenshot of rainglow.zachleat.dev

Implementation

Related:


This content originally appeared on Zach Leatherman and was authored by Zach Leatherman


Print Share Comment Cite Upload Translate Updates
APA

Zach Leatherman | Sciencx (2021-07-16T05:00:00+00:00) Rainglow: a demo of Eleventy Serverless. Retrieved from https://www.scien.cx/2021/07/16/rainglow-a-demo-of-eleventy-serverless/

MLA
" » Rainglow: a demo of Eleventy Serverless." Zach Leatherman | Sciencx - Friday July 16, 2021, https://www.scien.cx/2021/07/16/rainglow-a-demo-of-eleventy-serverless/
HARVARD
Zach Leatherman | Sciencx Friday July 16, 2021 » Rainglow: a demo of Eleventy Serverless., viewed ,<https://www.scien.cx/2021/07/16/rainglow-a-demo-of-eleventy-serverless/>
VANCOUVER
Zach Leatherman | Sciencx - » Rainglow: a demo of Eleventy Serverless. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/07/16/rainglow-a-demo-of-eleventy-serverless/
CHICAGO
" » Rainglow: a demo of Eleventy Serverless." Zach Leatherman | Sciencx - Accessed . https://www.scien.cx/2021/07/16/rainglow-a-demo-of-eleventy-serverless/
IEEE
" » Rainglow: a demo of Eleventy Serverless." Zach Leatherman | Sciencx [Online]. Available: https://www.scien.cx/2021/07/16/rainglow-a-demo-of-eleventy-serverless/. [Accessed: ]
rf:citation
» Rainglow: a demo of Eleventy Serverless | Zach Leatherman | Sciencx | https://www.scien.cx/2021/07/16/rainglow-a-demo-of-eleventy-serverless/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.