+++ date = "2022-12-21T23:02:00+00:00" lastmod = "2022-12-21T23:02:00+00:00" tags = [ "webdev", "clips" ] author = "tdro" +++ [Hugo](https://github.com/gohugoio/hugo#readme) is a gateway for discovering [neat golang libraries](https://github.com/marekm4/color-extractor#readme). Version [0.104.0](https://github.com/gohugoio/hugo/releases/tag/v0.104.0) introduced a color extraction method that has lots of use--cases. An easy one is to generate basic [image gradient](https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/radial-gradient) placeholders. The browser has its own deferred/lazy loading logic so fancy image gradients (on a static site) require only a few lines of pre--generated {{< abbr CSS "Cascading Style Sheets" >}} styles. {{< video remote=true preload="none" caption="Easier to show in Chromium compared to Firefox (a tad too fast/clever to capture)" options="controls loop muted" source="https://res.cloudinary.com/dpszgzqjb/video/upload/v1671610545/css-gradients.mp4" poster="https://res.cloudinary.com/dpszgzqjb/image/upload/v1671610549/css-gradients-poster.png" >}}