Generate an identicon from a string.
identicon : String -> String -> Html msg
Generate a identicon from a string
main =
identicon "200px" "Hello identicon!"
custom : (String -> Basics.Int) -> (String -> Color) -> String -> String -> Html msg
Creates an identicon with your own hasher/colorer where the string is passed into both the hasher and colorer. Here's how to create an identicon that's always the color red:
import Color exposing (rgb255)
main =
custom defaultHash (always <| rgb255 255 0 0) "200px" "Hello Identicon!"
defaultHash : String -> Basics.Int
One-at-a-Time Hash
Taken from http://www.burtleburtle.net/bob/hash/doobs.html.
defaultColor : String -> Color
Generate a color from a string
This generates the same color that would be used in the identicon.