PHPackages                             lewisjenkins/craft-color-picker - 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. lewisjenkins/craft-color-picker

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

lewisjenkins/craft-color-picker
===============================

A simple color picker for Craft CMS.

1.0.2(6y ago)16.4k2[2 issues](https://github.com/lewisjenkins/craft-color-picker/issues)[1 PRs](https://github.com/lewisjenkins/craft-color-picker/pulls)proprietaryPHPCI failing

Since Jul 24Pushed 3y ago1 watchersCompare

[ Source](https://github.com/lewisjenkins/craft-color-picker)[ Packagist](https://packagist.org/packages/lewisjenkins/craft-color-picker)[ RSS](/packages/lewisjenkins-craft-color-picker/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

LJ Color Picker plugin for Craft CMS 3.x
========================================

[](#lj-color-picker-plugin-for-craft-cms-3x)

A simple color picker for Craft CMS based on the [jQuery Spectrum plugin](https://github.com/bgrins/spectrum).

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 3.0.0 or later.

Installation
------------

[](#installation)

You can install the plugin via the Craft Plugin Store.

Overview
--------

[](#overview)

This plugin adds the following fieldtype:

- LJ Color Picker

Screenshot
----------

[](#screenshot)

[![Screenshot](resources/img/9.png)](resources/img/9.png)

Quick start
-----------

[](#quick-start)

The default behaviour is to display a mini-picker that shows the currently selected color. For example:

[![Screenshot](resources/img/7.png)](resources/img/7.png)

Clicking on the mini-picker shows the full interface.

Alternatively, you can embed the full interface directly into the page with `flat: true`.

Examples
--------

[](#examples)

Copy one of the following examples into the Parameters field above.

### Simple example

[](#simple-example)

[![Screenshot](resources/img/1.png)](resources/img/1.png)

```
allowEmpty: true,
preferredFormat: "hex",
showButtons: false

```

### Show input

[](#show-input)

[![Screenshot](resources/img/2.png)](resources/img/2.png)

```
allowEmpty: true,
preferredFormat: "hex",
showButtons: false,
showInput: true

```

### Show alpha

[](#show-alpha)

[![Screenshot](resources/img/3.png)](resources/img/3.png)

```
allowEmpty: true,
preferredFormat: "rgb",
showButtons: false,
showInput: true,
showAlpha: true

```

### Show palette

[](#show-palette)

[![Screenshot](resources/img/4.png)](resources/img/4.png)

```
allowEmpty: true,
showButtons: false,
showPalette: true,
palette: [
    ['black', 'white', 'blanchedalmond'],
    ['rgb(255, 128, 0);', 'hsv 100 70 50', 'lightyellow']
]

```

### Show palette only

[](#show-palette-only)

[![Screenshot](resources/img/5.png)](resources/img/5.png)

```
showPaletteOnly: true,
showPalette:true,
palette: [
    ['black', 'white', 'blanchedalmond',
    'rgb(255, 128, 0);', 'hsv 100 70 50'],
    ['red', 'yellow', 'green', 'blue', 'violet']
]

```

### Twig logic

[](#twig-logic)

[![Screenshot](resources/img/8.png)](resources/img/8.png)

```
{% set colors = ['black', 'red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet'] %}
{% set palette %}
	[
	{% for row in colors|batch(2) %}
		{{ loop.index > 1 ? ',' }}
	    [
        {% for color in row %}
        	{{ loop.index > 1 ? ',' }}
            '{{ color }}'
        {% endfor %}
	    ]
	{% endfor %}
	]
{% endset %}

showPaletteOnly: true,
showPalette:true,
palette: {{ palette }}

```

### Params in an external file

[](#params-in-an-external-file)

(relative to /templates folder)

```
{% include '_colorPickerParams.json' ignore missing %}

```

### More examples

[](#more-examples)

See the original [jQuery Spectrum plugin](https://github.com/bgrins/spectrum) for more examples.

---

This plugin is based on the [jQuery Spectrum plugin](https://github.com/bgrins/spectrum) plugin \[[MIT licence](https://github.com/bgrins/spectrum/blob/master/LICENSE)\], with thanks to the original developer.

Brought to you by [Lewis Jenkins](https://lj.io).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

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

Total

3

Last Release

2285d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3381958?v=4)[Lewis Jenkins](/maintainers/lewisjenkins)[@lewisjenkins](https://github.com/lewisjenkins)

---

Top Contributors

[![lewisjenkins](https://avatars.githubusercontent.com/u/3381958?v=4)](https://github.com/lewisjenkins "lewisjenkins (19 commits)")

---

Tags

cmsCraftcraftcmscraft-plugincraft color pickerlj color picker

### Embed Badge

![Health badge](/badges/lewisjenkins-craft-color-picker/health.svg)

```
[![Health](https://phpackages.com/badges/lewisjenkins-craft-color-picker/health.svg)](https://phpackages.com/packages/lewisjenkins-craft-color-picker)
```

###  Alternatives

[verbb/navigation

Create navigation menus for your site.

90683.7k17](/packages/verbb-navigation)[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[verbb/comments

Add comments to your site.

13753.1k](/packages/verbb-comments)[verbb/tablemaker

Create customizable and user-defined table fields.

40168.8k1](/packages/verbb-tablemaker)[supercool/tablemaker

Create customizable and user-defined table fields.

40141.7k](/packages/supercool-tablemaker)[pennebaker/craft-architect

CraftCMS plugin to generate content models from JSON/YAML data.

72148.5k5](/packages/pennebaker-craft-architect)

PHPackages © 2026

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