ryanpotter/silverstripe-color-field

Silverstripe Color Field

Installs: 47 497

Dependents: 12

Suggesters: 0

Security: 0

Stars: 10

Watchers: 3

Forks: 10

Open Issues: 0

Type:silverstripe-vendormodule

1.0.2 2023-08-17 03:47 UTC

This package is auto-updated.

Last update: 2024-11-05 06:56:08 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'