ryanpotter / silverstripe-color-field
Silverstripe Color Field
Installs: 48 556
Dependents: 12
Suggesters: 0
Security: 0
Stars: 10
Watchers: 3
Forks: 10
Open Issues: 0
Type:silverstripe-vendormodule
Requires
- silverstripe/framework: ^4.0 || ^5.0
This package is auto-updated.
Last update: 2024-12-05 07:12:32 UTC
README
A colour picker field for the Silverstripe CMS.
Uses Iris Colour Picker.
Installation
Installation with composer:
composer require ryanpotter/silverstripe-color-field
Usage
use RyanPotter\SilverStripeColorField\Forms\ColorField;
private static $db = [ 'MyColor' => DBVarchar::class . '(7)', ];
ColorField::create('MyColor')
Screenshot
Configuration
Add as many colours as you want to the palettes.
RyanPotter\SilverStripeColorField\Forms\ColorField: colors: - '#1976D2' - '#2196F3' - '#BBDEFB' - '#FFFFFF' - '#FF4081' - '#212121' - '#727272' - '#B6B6B6'