Thanks to some prodding by ku1ik on the Elixir Forum thread of IdenticonSvg , I put in some effort to implement three features that were long missing:
-
Automatic background color: you can now pass the argument
:basic
for basic color complementarity,:split1
for the first option of split complementarity, or:split2
for the second one. Passingnil
sets the background to transparent, as before. -
Padding: you can now pass an integer argument for the padding width, in terms of “blocks”. So, if
size
is 5 andpadding
is 1, the total size of the resulting SVG file is 7x7 blocks. -
File size reduction: the resulting SVG files are now much smaller, as the naive array of foreground and background
<rect>
elements is replaced by a<path>
with the content of itsd
attribute written in a compact manner. The background results from a mask. The output is now typically way less than one kilobyte.
The result is v0.9.2 on Hex .