proxy.golang.org : github.com/pbnjay/tinyicons
Package tinyicons is a tiny package to generate icons from a user string (such as an email address or username). Similar in principal to gravatar but with a focus on a tiny, fast, and simple implementation and tiny png images. Icons are generated from a 32-bit FNV-1a hash of the input value, which bits determines a 7x7 pattern. The most significant 4 bits determine the foreground color from a pre-defined color palette. The 7 rows of the icon are determined from 4-bit sequences starting at the LSB. Bits 0,1,2,3 are used to determine if the foreground color is set in the 7-pixel-wide row using the pattern: [3210123]. When encoded as a PNG image, a 1-pixel background-color border is added, and all pixels are scaled by ScaleFactor, so the 7x7 pattern becomes (9x9)x4 = 36x36 pixels. The Icon can thus be packed into a 8-character hex string to allow easy referencing without the original string.
Registry
-
Source
- Documentation
- JSON
- codemeta.json
purl: pkg:golang/github.com/pbnjay/tinyicons
License: MIT
Latest release: 14 days ago
Namespace: github.com/pbnjay
Stars: 1 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 14 days ago