diff --git a/bin/favicon-generator b/bin/favicon-generator old mode 100644 new mode 100755 index e90b5aa..f722ed4 --- a/bin/favicon-generator +++ b/bin/favicon-generator @@ -108,7 +108,7 @@ final class CliContext writeln('Options:'); writeln('--icon-background Set color under icon, defaults to transparent'); writeln('--theme-color Color to used in manifest `theme_color` and default letter background color, defaults to #00AAAD'); - writeln('--tile-color Color to used in manifest `background_color` and used fill ms-tiles with, defaults to #00AAAD'); + writeln('--tile-color Color to used in manifest `background_color` and used fill apple touch and ms-tiles with, defaults to #00AAAD'); writeln('--letter-color Color of the letter, used when using letter: input, defaults to #FFFFFF'); writeln('--letter-background Color of the background, used when using letter: input, defaults to theme color'); writeln('--root Location inside the root directory where the favicons are saved to, defaults to /'); diff --git a/src/ApplePackage.php b/src/ApplePackage.php index 7b1f560..05b558d 100644 --- a/src/ApplePackage.php +++ b/src/ApplePackage.php @@ -13,7 +13,7 @@ public function __construct( public function package(Input $input, WebApplicationManifest $manifest, string $rootPrefix): \Generator { - $generator = new AppleTouchGenerator($input, $this->size); + $generator = new AppleTouchGenerator($input, $this->size, $manifest->backgroundColor); yield 'apple-touch-icon.png' => $generator->generate(); $generator = AppleSafariPinGenerator::cliDetectImageMagickVersion($input); diff --git a/src/AppleTouchGenerator.php b/src/AppleTouchGenerator.php index 35dfb31..2e00ffc 100644 --- a/src/AppleTouchGenerator.php +++ b/src/AppleTouchGenerator.php @@ -9,6 +9,7 @@ final class AppleTouchGenerator implements GeneratorInterface public function __construct( private readonly Input $input, private readonly int $size, + private readonly string $backgroundColor, ) { } @@ -25,7 +26,7 @@ public function generate(): string $composite->newImage($newWidth + 2 * $padding, $newHeight + 2 * $padding, new \ImagickPixel('none')); $paddingDraw = new \ImagickDraw(); - $paddingDraw->setFillColor(new \ImagickPixel($this->input->backgroundColor)); + $paddingDraw->setFillColor(new \ImagickPixel($this->backgroundColor)); $paddingDraw->roundRectangle( 0, 0,