undigitalvn/silverstripe-color-field

Silverstripe Color Field

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 12

Type:silverstripe-vendormodule

dev-master 2025-08-04 11:56 UTC

This package is not auto-updated.

Last update: 2025-08-05 10:19:19 UTC


README

Latest Stable Version Total Downloads Monthly Downloads

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

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'