Skip to content

jaidetree/clj-lineart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CGI-Clojure Line Art Generator

Generates a slightly-randomized, generative line art design based on a bg and fg parameters.

Usage

https://cgi.eccentric-j.com/lineart/lineart.svg?bg=000000&fg=ffffff

BG

Background color of the canvas any valid hex color string should work.

FG

Foreground color for lines. The script will lower their opacity to prevent the contrast from becoming distracting.

Tiled as a background-image

.generative-bg {
    height: 100px;
    background: url('https://cgi.eccentric-j.com/lineart/lineart.svg?bg=363333&fg=F3C581');
    background-repeat: repeat-x;
}

Example

Below is a saved response from the request, note that each request will look slightly different.

./doc/example.svg

Preview within the Org Doc

bb -cp src test/lineart.clj "bg=363333&fg=F3C581"

Save output from bash

bb -cp src test/lineart.clj "bg=363333&fg=F3C581" > test/lineart.svg

How it Works

Basically just a Clojure script over cgi that generates the SVG XML. More information is available at https://eccentric-j.com/blog/clojure-like-its-php.html.

About

Generative line art from a clojure-cgi script

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published