diff --git a/composer.lock b/composer.lock index 416836c2f..488f00bfa 100644 --- a/composer.lock +++ b/composer.lock @@ -1674,16 +1674,16 @@ }, { "name": "intervention/image", - "version": "3.10.1", + "version": "3.10.2", "source": { "type": "git", "url": "https://github.com/Intervention/image.git", - "reference": "8230387f14d5727745934673ebe70fdbe161f581" + "reference": "1c68e5fdf443374f3580c5b920a7f177eccdab85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Intervention/image/zipball/8230387f14d5727745934673ebe70fdbe161f581", - "reference": "8230387f14d5727745934673ebe70fdbe161f581", + "url": "https://api.github.com/repos/Intervention/image/zipball/1c68e5fdf443374f3580c5b920a7f177eccdab85", + "reference": "1c68e5fdf443374f3580c5b920a7f177eccdab85", "shasum": "" }, "require": { @@ -1730,7 +1730,7 @@ ], "support": { "issues": "https://github.com/Intervention/image/issues", - "source": "https://github.com/Intervention/image/tree/3.10.1" + "source": "https://github.com/Intervention/image/tree/3.10.2" }, "funding": [ { @@ -1746,7 +1746,7 @@ "type": "ko_fi" } ], - "time": "2024-12-27T14:53:08+00:00" + "time": "2025-01-04T07:31:37+00:00" }, { "name": "jetbrains/phpstorm-stubs", diff --git a/src/Assets/Image.php b/src/Assets/Image.php index 5276d19bc..207e88ebc 100644 --- a/src/Assets/Image.php +++ b/src/Assets/Image.php @@ -116,7 +116,7 @@ public static function getDominantColor(Asset $asset): string $assetColor = $assetColor->resize(100); $image = self::manager()->read($assetColor['content']); - return $image->pickColor(0, 0)->toString(); + return $image->reduceColors(1)->pickColor(0, 0)->toString(); } catch (\Exception $e) { throw new RuntimeException(\sprintf('Can\'t get dominant color of "%s": %s', $asset['path'], $e->getMessage())); }