This package provides access to the color palettes used in Apple interfaces.
composer require phpcolor/apple-colors
use PhpColor\Colors\Apple\AppleColors as Apple;
$colors = Apple::iOS(); // iOS & iPadOS
$colors = Apple::macOS();
$colors = Apple::tvOS();
$colors = Apple::visionOS();
$colors = Apple::watchOS();
use PhpColor\Colors\Apple\AppleColors as Apple;
$colors = Apple::macOS('light');
$colors = Apple::macOS('dark');
$colors = Apple::iOS('light');
$colors = Apple::iOS('dark');
// visionOS has only one theme
$colors = Apple::visionOS();
use PhpColor\Colors\Apple\AppleColors as Apple;
$colors = Apple::watchOS();
$names = $colors->getNames();
// 'red', 'orange', 'yellow', 'green', 'mint', 'teal', 'cyan',
// 'blue', 'indigo', 'purple', 'pink', 'brown', 'gray'
use PhpColor\Colors\Apple\AppleColors as Apple;
$colors = Apple::macOS();
echo $colors->blue; // #007AFF
echo $colors->get('indigo'); // #5856D6
The colors listed in this project are based on the colors used by Apple.
This PHPColor package is released under the MIT license.