PHPackages                             otago/opcolor - 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. otago/opcolor

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

otago/opcolor
=============

a color palette dropdown

v6.0(3mo ago)57.5k3[1 PRs](https://github.com/otago/opcolor/pulls)BSD-3-ClausePHP

Since Nov 2Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/otago/opcolor)[ Packagist](https://packagist.org/packages/otago/opcolor)[ Docs](https://github.com/otago/opcolor)[ RSS](/packages/otago-opcolor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (12)Used By (0)

ColorField
==========

[](#colorfield)

Creates a colour palette dropdown for SilverStripe 3, 4, or 5.

Color selector
--------------

[](#color-selector)

[![OP color in the CMS](https://raw.githubusercontent.com/otago/opcolor/master/images/image2.png)](https://raw.githubusercontent.com/otago/opcolor/master/images/image2.png)

Create your accepted colors and names in the settings tab in the CMS

[![OP color in the settings](https://raw.githubusercontent.com/otago/opcolor/master/images/image1.png)](https://raw.githubusercontent.com/otago/opcolor/master/images/image1.png)

use the drop down to select your color

Expose the JS/css files
=======================

[](#expose-the-jscss-files)

`composer vendor-expose`

Usage
-----

[](#usage)

```
	use OP\ColorField;
	public static $db = [
		'ClassOverride' => 'Text'
	];

	function getCMSFields() {
		$fields = parent::getCMSFields();
		// create the op color field
		$colordropdown = ColorField::create('ClassOverride', 'Color Override', $this->ClassOverride);
		$colordropdown->setEmptyString('');
		$fields->addFieldToTab("Root.Main", $colordropdown, "Content");

		return $fields;
	}

```

What it does
------------

[](#what-it-does)

It stores the CSSColor in the specified text field. Note the RGB color is the value that colors the box in the dropdown field. Other values, such as the CSSHex and CSSCMYK are optional.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance78

Regular maintenance activity

Popularity30

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 93.3% of commits — single point of failure

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 ~410 days

Recently: every ~630 days

Total

11

Last Release

113d ago

Major Versions

1.0.1 → v4.0.12018-10-01

v4.0.6 → v5.02024-08-06

5.1 → v6.02026-01-26

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/67215?v=4)[torleif](/maintainers/torleif)[@torleif](https://github.com/torleif)

---

Top Contributors

[![torleif](https://avatars.githubusercontent.com/u/67215?v=4)](https://github.com/torleif "torleif (28 commits)")[![kauareboi](https://avatars.githubusercontent.com/u/3020264?v=4)](https://github.com/kauareboi "kauareboi (1 commits)")[![sunnysideup](https://avatars.githubusercontent.com/u/167154?v=4)](https://github.com/sunnysideup "sunnysideup (1 commits)")

---

Tags

silverstripecolorcolor dropdowncolor field

### Embed Badge

![Health badge](/badges/otago-opcolor/health.svg)

```
[![Health](https://phpackages.com/badges/otago-opcolor/health.svg)](https://phpackages.com/packages/otago-opcolor)
```

###  Alternatives

[tractorcow/silverstripe-colorpicker

Color picker field for Silverstripe CMS using the ColorPicker jQuery plugin

18250.8k13](/packages/tractorcow-silverstripe-colorpicker)[silverstripe/multi-domain

Allows multiple domains to access one CMS instance, mapping them to different sections of the hierarchy

141.6k](/packages/silverstripe-multi-domain)

PHPackages © 2026

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