PHP code example of ryangjchandler / filament-color-palette

1. Go to this page and download the library: Download ryangjchandler/filament-color-palette library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ryangjchandler / filament-color-palette example snippets


use RyanChandler\FilamentColorPalette\ColorPalette;

ColorPalette::make('color')
    ->options([
        '#ffffff' => 'White',
        '#ff0000' => 'Red',
        '#000000' => 'Black',
    ]),

ColorPalette::make('color')
    ->storeColorName()
    ->options([
        '#ffffff' => 'White',
        '#ff0000' => 'Red',
        '#000000' => 'Black',
    ]),

ColorPalette::make('color')
    ->allowCustomColors()
    ->options([
        '#ffffff' => 'White',
        '#ff0000' => 'Red',
        '#000000' => 'Black',
    ]),