ryanpotter/silverstripe-color-field

Silverstripe Color Field

Installs: 19 267

Dependents: 8

Suggesters: 0

Security: 0

Stars: 7

Watchers: 3

Forks: 8

Open Issues: 2

Type:silverstripe-vendormodule

1.0.1 2018-10-24 03:38 UTC

This package is not auto-updated.

Last update: 2021-07-24 01:10:44 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'