Skip to content

imliam/logophpile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logophpile

Turn an emoji (or text initials) into a complete browser icon set - favicon, Apple touch icon, Android Chrome icons, Windows tile, webmanifest, and browserconfig - in one command.

Requirements

  • PHP 8.5+
  • ImageMagick (brew install imagemagick / sudo apt install imagemagick)
  • Internet connection (to fetch emoji SVGs from jsDelivr CDN - or use --font for offline mode)

Install

Logophpile requires PHP. Using Composer, you can install Logophpile globally with the following command:

composer global require logophpile/logophpile

Alternatively, you can use cpx to run Logophpile:

cpx imliam/logophpile

Usage

Interactive wizard

Run with no arguments to be guided through every option:

logophpile

CLI

logophpile 🦊
logophpile 🦊 --output=./public --name="My App"
logophpile 🌿 --background=#1a1a2e --padding=15
logophpile 👋🏽 --set=openmoji
logophpile 🦊 --font=/path/to/NotoColorEmoji.ttf   # offline, no CDN
logophpile --text=SK --font=Arial                   # text/initials mode

Options

Option Default Description
--output=<dir> ./public or . Output directory
--background=<color> none Icon background - none = transparent
--shape=<shape> square square · rounded · squircle · circle
--set=<set> twemoji twemoji · openmoji · noto
--padding=<n> 10 Padding on each side, 0–40%
--name=<name> App App name written into site.webmanifest
--theme=<color> background color theme_color in manifest and <meta name="theme-color">
--text=<string> - Render text instead of an emoji
--color=<color> #000000 Fill colour for --text mode
--font=<font> - Font name or .ttf/.otf path - enables offline mode

Output files

favicon.ico                  16×16 + 32×32 + 48×48 embedded
favicon-16x16.png
favicon-32x32.png
apple-touch-icon.png         180×180
android-chrome-192x192.png
android-chrome-512x512.png
mstile-150x150.png
logo.svg
site.webmanifest
browserconfig.xml

Add to your <head>

Print the HTML snippet to paste into your <head>:

logophpile markup
logophpile markup --background=#1a1a2e --theme=#7c3aed
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-config" content="/browserconfig.xml">
<meta name="theme-color" content="#ffffff">

Logophpile also prints this snippet automatically after every generate run.

About

Turn an emoji or text into a complete icon set

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages