PHPackages                             toastnz/theme-colours - 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. toastnz/theme-colours

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

toastnz/theme-colours
=====================

Silverstripe theme colours module

1.1.4(2y ago)04.5kBSD-3-ClausePHPPHP &gt;=8.1

Since May 19Pushed 1y ago2 watchersCompare

[ Source](https://github.com/toastnz/theme-colours)[ Packagist](https://packagist.org/packages/toastnz/theme-colours)[ RSS](/packages/toastnz-theme-colours/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (7)Versions (31)Used By (0)

### Installation

[](#installation)

---

The easiest way is to use [composer](https://getcomposer.org/):

```
composer require toastnz/theme-colours

```

Run `dev/build` afterwards.

### Configuration

[](#configuration)

---

Add the following to your `config.yml` (optional) to generate default colours on dev/build Colours with a hex value will be locked and not editable in the CMS Colours with null value will be editable in the CMS

```
Toast\ThemeColours\Models:
  default_colours:
    - primary: null
    - secondary: null
    - black: '000000'
    - white: 'ffffff'
```

### Usage

[](#usage)

---

### Colour functions

[](#colour-functions)

`getColourCustomID()` returns either the ID set in the config.yml, or for additional colours, returns the ID

`getColourPaletteID()` returns a combination of the getColourCustomID() and the Title, so the data object can be found from the selected colour palette field value.

`getColourClassName()` returns `c-` + `getColourCustomID()` so the css class is unique. `c-` is there to represent `colour` and to ensure the class does not start with a number.

`getColourBrightness()` returns either `dark` or `light` based on their luminocity of the colour value.

`getColourHexCode()` returns the hex value of the colour

`getColourClasses()` will return a combination of the `getColourClassName()` and `getColourBrightness()`

### Helper functions

[](#helper-functions)

`Helper::getThemeColourPalette()` to loop through the $themeColours and add the Title and Value to the $array for ColorPaletteField to use.

`Helper::getThemeColourFromColourPaletteID` to loop through the $themeColours and return the object that matches the $colourPaletteID

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 53.1% 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 ~27 days

Recently: every ~132 days

Total

26

Last Release

464d ago

Major Versions

1.1.4 → 6.0.0-beta12025-03-26

PHP version history (2 changes)1.0.0PHP &gt;=8.1

6.0.0-beta1PHP &gt;=8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/9cc41858b7e0e95f7c9ff396fc2d454339424c425d8f78aeb526434da6f61543?d=identicon)[priscilla-toastnz](/maintainers/priscilla-toastnz)

---

Top Contributors

[![emmanuel-toast](https://avatars.githubusercontent.com/u/44280336?v=4)](https://github.com/emmanuel-toast "emmanuel-toast (17 commits)")[![priscillay-toast](https://avatars.githubusercontent.com/u/92568971?v=4)](https://github.com/priscillay-toast "priscillay-toast (15 commits)")

---

Tags

silverstripemodulartheme colours

### Embed Badge

![Health badge](/badges/toastnz-theme-colours/health.svg)

```
[![Health](https://phpackages.com/badges/toastnz-theme-colours/health.svg)](https://phpackages.com/packages/toastnz-theme-colours)
```

###  Alternatives

[silverstripe/userforms

UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code

1371.1M85](/packages/silverstripe-userforms)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[symbiote/silverstripe-advancedworkflow

Adds configurable workflow support to the CMS, with a GUI for creating custom workflow definitions.

46302.4k9](/packages/symbiote-silverstripe-advancedworkflow)[silverstripe/sharedraftcontent

Share draft page content with non-CMS users

21424.1k12](/packages/silverstripe-sharedraftcontent)

PHPackages © 2026

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