0.0.1 • Published 6 years ago

favicon-uri v0.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

Installation

npm install --save favicon-uri

Command line usage

Pass any valid css hex color or named color and favicolor will write the corresponding data uri to stdout.

I like using these for favicons, but you can use them however you like.

$ favicolor steelblue
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAklEQVR4AewaftIAAAALSURBVGNwa9ryHwAFCgJ8ShCPgQAAAABJRU5ErkJggg==

You can then use that in an image tag

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAklEQVR4AewaftIAAAALSURBVGNwa9ryHwAFCgJ8ShCPgQAAAABJRU5ErkJggg==" width="15" height="15">

Or a favicon tag:

<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAklEQVR4AewaftIAAAALSURBVGNwa9ryHwAFCgJ8ShCPgQAAAABJRU5ErkJggg==">

Examples

favicolor steelblue

favicolor "#bada55"

favicolor rebeccapurple