favico(1)

NAME

favico - an utility for creating favicons

SYNOPSIS

favico [OPTION]…​ [IMAGE]

DESCRIPTION

favico is a command-line utility for creating favicons.

favico will generate favicons in the PNG format and the ICO format which contains images in the BMP format or the PNG format from the input image file, and outputs them to the specified directory or the current directory. favico also generates the web app manifest for a progressive web app (PWA) in the same directory where the favicons are output.

Table 1. List of the generated files
FilenameDescription

android-chrome-192x192.png

For Android Chrome

android-chrome-512x512.png

For Android Chrome

apple-touch-icon.png

For Safari on iOS and iPadOS

favicon-16x16.png

The classic favicon

favicon-32x32.png

For Safari on macOS

favicon.ico

The original favicon

site.webmanifest

Web app manifest

Some members of the web app manifest can be configured via options.

List of the configurable members
  • name (--name)

  • short_name (--short-name)

  • theme_color (--theme-color)

  • background_color (--background-color)

The CSS color string can be specified as a value for --theme-color and/or --background-color.

Table 2. List of methods to specify a color
FormatExamples

Named colors

brown, lightslategray

Hexadecimal notations

#111, #eee8, #a52a2a, #7788997f

RGB functions

rgb(165 42 42), rgb(119 136 153 / 49.8%)

HSL functions

hsl(248 39% 39.2%), hsl(0 0% 66.3% / 49.8%)

HWB function

hwb(50.6 0% 0%), hwb(0 66.3% 33.7% / 49.8%)

Oklab function

oklab(50.4% -0.0906 0.0069), oklab(61.9% -0.0120 -0.0302 / 0.5)

Oklch function

oklch(59.41% 0.16 301.29), oklch(61.9% 0.032 248.35 / 49.8%)

Use -t option to specify the image format. If this option is not specified, the image format is determined based on the extension or the magic number.

POSITIONAL ARGUMENTS

IMAGE

Input image file. If IMAGE is not specified, or if "-" is specified, the image will be read from standard input. Supported raster image formats are based on the formats supported by the image crate. The format of IMAGE is determined based on the extension or the magic number if possible. If the format cannot be determined, use --format. Note that IMAGE must be square.

OPTIONS

-o, --output PATH

Directory to output generated files. If the directory does not exist, it will be created. Default is the current directory.

--png

Store PNG images instead of BMP images to an ICO image.

--name NAME

Set the name member of the web app manifest.

--short-name NAME

Set the short_name member of the web app manifest. If NAME is not specified, the name specified in --name will be set.

--theme-color COLOR

Set the theme_color member of the web app manifest. COLOR takes a CSS color string. Note that COLOR is converted to the sRGB color space, so a lossy conversion may be performed. Default is "#ffffff".

--background-color COLOR

Set the background_color member of the web app manifest. COLOR takes a CSS color string. Note that COLOR is converted to the sRGB color space, so a lossy conversion may be performed. Default is "#ffffff".

--filter FILTER

Sampling filter used to resize the input image.

The possible values are:
nearest

Nearest Neighbor.

triangle

Linear Filter.

catmullrom

Cubic Filter. This is the default value.

gaussian

Gaussian Filter.

lanczos3

Lanczos with window 3.

-f, --format FORMAT

The format of the input. If FORMAT is not specified, the format is determined based on the extension or the magic number.

The possible values are:
bmp

Windows Bitmap.

dds

DirectDraw Surface.

farbfeld

Farbfeld.

gif

Graphics Interchange Format.

hdr

Radiance RGBE.

ico

ICO file format. This value also includes the CUR file format.

jpeg

JPEG.

openexr

OpenEXR.

png

Portable Network Graphics.

pnm

Portable Anymap Format.

qoi

Quite OK Image Format.

tga

Truevision TGA.

tiff

Tag Image File Format.

webp

WebP.

xbm

X BitMap.

-h, --help

Print help message. The short flag (-h) will print a condensed help message while the long flag (--help) will print a detailed help message.

-V, --version

Print version number. The long flag (--version) will also print the copyright notice, the license notice and where to report bugs.

--generate-completion SHELL

Generate shell completion. The completion is output to standard output.

The possible values are:
bash

Bash.

elvish

Elvish.

fish

fish.

nushell

Nushell.

powershell

PowerShell.

zsh

Zsh.

EXIT STATUS

0

Successful program execution.

1

An error occurred.

2

An error occurred while parsing command-line arguments.

65

The input data was incorrect in some way.

66

An input file did not exist or was not readable.

69

A service is unavailable.

71

An operating system error has been detected.

74

An error occurred while doing I/O on some file.

77

You did not have sufficient permission to perform the operation.

EXAMPLES

Generate favicons in the current directory:

$ favico input.png

Generate favicons in the specified directory:

$ favico -o out input.png

Generate favicons with the specified member:

$ favico --name app --theme-color "#a52a2a" input.png

Generate favicons with the specified sampling filter:

$ favico --filter nearest input.png

Generate favicons from a WebP image:

$ favico -f webp input.webp

Copyright © 2024 Shun Sakai

  1. This program is distributed under the terms of the GNU General Public License v3.0 or later.

  2. This manual page is distributed under the terms of the Creative Commons Attribution 4.0 International Public License.

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

SEE ALSO

magick(1)