PHPackages                             fromholdio/silverstripe-colorpalette - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fromholdio/silverstripe-colorpalette

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

fromholdio/silverstripe-colorpalette
====================================

A color palette picker for SilverStripe CMS

4.0.0(1mo ago)11.1k[1 issues](https://github.com/fromholdio/silverstripe-colorpalette/issues)2MITJavaScript

Since Jul 14Pushed 1mo agoCompare

[ Source](https://github.com/fromholdio/silverstripe-colorpalette)[ Packagist](https://packagist.org/packages/fromholdio/silverstripe-colorpalette)[ RSS](/packages/fromholdio-silverstripe-colorpalette/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (6)Dependencies (4)Versions (17)Used By (2)

SilverStripe Color Palette Field
================================

[](#silverstripe-color-palette-field)

Provides a color picker field in SilverStripe allowing a user to select from defined selection of colors (palette)

Forked from heyday/silverstripe-colorpalette, applying PRs and fresh styling. 2.x branch is compatible as a direct replacement of the original repo's 2.x branch.

**As of 3.2.0, this module now contains a React component, enabling compatibility for the field with Elemental inline forms.**

The active 3.x branch diverges from the original with additional features and breaking changes:

- Provide text labels per color and have them displayed to users
- Set a full CSS background declaration per color rather than just a hex value (allowing for gradients/images/etc)
- Can set some text string like "Aa" which will be placed on top of the color box (optional)
- Set a CSS color value separate to the background value, which the text on top of the box will be colored (might have two different themes with same bg style but different text colour, for example)
- Improved 'selected' visual treatment
- Grouped field now subclasses the single version of the field and reduced repeated code

Installation (with composer)
----------------------------

[](#installation-with-composer)

```
$ composer require fromholdio/silverstripe-colorpalette

```

Example
-------

[](#example)

[![Color Palette Example](resources/example_v3.png?raw=true)](resources/example_v3.png?raw=true)

Usage
-----

[](#usage)

### Regular palette

[](#regular-palette)

```
$fields->addFieldToTab(
    'Root.Main',
    Fromholdio\ColorPalette\Fields\ColorPaletteField::create(
        'BackgroundColor',
        'Background Color',
        [
            // still works
            'white' => '#fff',      // will be applied as 'background_css' value
            // new config options
            'black' => [
                'label' => 'Jet Black',     // displayed in field under color box
                'background_css' => '#111', // without ';', used to fill in color box
                'color_css' => '#FFFFFE',   // used to style the sample_text displayed on top of color box
                'sample_text' => 'Aa'       // if color_css is provided, this text displayed on top of color box
            ]
        ]
    )
);```

### Grouped Palette

```php
$fields->addFieldToTab(
    'Root.Main',
    Fromholdio\ColorPalette\Fields\GroupedColorPaletteField::create(
        'BackgroundColor',
        'Background Color',
        [
            'Group title' => [
                'black' => '#000',
                'white' => [
                    'label' => 'White',
                    'background_css' => '#FFF',
                    'color_css' => '#000',
                    'sample_text' => 'Aa'
                ]
            ],
            'Another group title' => [
                'red' => '#ff0'
            ]
        ]
    )
);
```

License
-------

[](#license)

SilverStripe Color Palette Field is licensed under an [MIT license](http://fromholdio.mit-license.org/)

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance69

Regular maintenance activity

Popularity19

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~333 days

Recently: every ~268 days

Total

15

Last Release

56d ago

Major Versions

1.1.0 → 2.0.02017-11-25

2.0.4 → 3.0.02022-08-01

2.x-dev → 3.1.02023-05-24

3.x-dev → 4.x-dev2025-10-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/40e135ad117686bee39707c1d9286cc5e915e219c26a10d13858ca44d14f1eb0?d=identicon)[dizzystuff](/maintainers/dizzystuff)

---

Top Contributors

[![dizzystuff](https://avatars.githubusercontent.com/u/576903?v=4)](https://github.com/dizzystuff "dizzystuff (21 commits)")[![camspiers](https://avatars.githubusercontent.com/u/51294?v=4)](https://github.com/camspiers "camspiers (11 commits)")[![MattyBalaam](https://avatars.githubusercontent.com/u/1246923?v=4)](https://github.com/MattyBalaam "MattyBalaam (7 commits)")[![lucasfrey](https://avatars.githubusercontent.com/u/7697132?v=4)](https://github.com/lucasfrey "lucasfrey (6 commits)")[![wernerkrauss](https://avatars.githubusercontent.com/u/1043925?v=4)](https://github.com/wernerkrauss "wernerkrauss (3 commits)")[![stecman](https://avatars.githubusercontent.com/u/2230769?v=4)](https://github.com/stecman "stecman (3 commits)")[![tyrannosaurusjames](https://avatars.githubusercontent.com/u/3037783?v=4)](https://github.com/tyrannosaurusjames "tyrannosaurusjames (1 commits)")[![UndefinedOffset](https://avatars.githubusercontent.com/u/1391558?v=4)](https://github.com/UndefinedOffset "UndefinedOffset (1 commits)")[![spekulatius](https://avatars.githubusercontent.com/u/8433587?v=4)](https://github.com/spekulatius "spekulatius (1 commits)")

### Embed Badge

![Health badge](/badges/fromholdio-silverstripe-colorpalette/health.svg)

```
[![Health](https://phpackages.com/badges/fromholdio-silverstripe-colorpalette/health.svg)](https://phpackages.com/packages/fromholdio-silverstripe-colorpalette)
```

###  Alternatives

[lekoala/silverstripe-cms-actions

Add actions to your models in SilverStripe

39317.0k29](/packages/lekoala-silverstripe-cms-actions)[lekoala/silverstripe-softdelete

Soft delete extension for SilverStripe

11212.9k](/packages/lekoala-silverstripe-softdelete)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
