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
:basicfor basic color complementarity,:split1for the first option of split complementarity, or:split2for the second one. Passingnilsets the background to transparent, as before. -
Padding: you can now pass an integer argument for the padding width, in terms of “blocks”. So, if
sizeis 5 andpaddingis 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 itsdattribute 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 .