mvriu5

payload color picker

by mvriu5
Custom fields
v3
^3.84.1

Overview

Summary generated from the README

Adds a color field for selecting colors in the Payload admin UI. The selected value is stored as a regular string field. A plugin function accepts a list of suggested colors, and the field is added to collections through a helper function. Requires Payload 3.

Features

  • colorField helper to add a color picker to any collection
  • Selected color stored as a plain string
  • Configurable list of suggested colors via the plugin options

Use cases

  • Let editors choose brand or theme colors for posts and pages
  • Offer a preset palette of suggested colors in the admin

From the author

A Payload CMS color picker field plugin.

Installation

npm i @mvriu5/payload-color-picker

1

Stars

0

Forks

5

Open Issues

1 months ago

Last Updated

17

Weekly Downloads

v1.0.2

npm Version

23.0 KB

Unpacked Size

0

Dependencies

GitHub stars

Trends appear after 7 days of data. Collecting since Oct 22 — 2 daily snapshots so far.

npm weekly downloads

Trends appear after 7 days of data. Collecting since Oct 22 — 2 daily snapshots so far.

Each point is npm's rolling 7-day download count.

Health Score

44/100Fair

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/1310974206-root.svg)](https://payloaddirectory.dev/plugins/1310974206-root)
HTML
<a href="https://payloaddirectory.dev/plugins/1310974206-root"><img src="https://payloaddirectory.dev/badge/1310974206-root.svg" alt="Payload Directory"></a>
Updated Sep 11, 2026Created Jul 24, 2026Published Jul 24, 2026

README

Payload Color Plugin

A Payload CMS plugin for selecting colors in the admin UI and storing the selected value as a string.

The package structure and development environment are prepared. The field, picker UI, and plugin behavior will be implemented in the next step.

Usage

import { colorField, payloadColorPlugin } from "@mvriu5/payload-color-picker"

export default buildConfig({
    collections: [
        {
            slug: "posts",
            fields: [
                colorField({
                    name: "color",
                    label: "Color",
                }),
            ],
        },
    ],
    plugins: [
        payloadColorPlugin({
            suggestedColors: ["#111827", "#3B82F6", "#22C55E", "#F59E0B"],
        }),
    ],
})

The selected color is stored as a regular string field.

Development

cp dev/.env.example dev/.env
docker compose up -d
pnpm dev

Build

pnpm build

Similar plugins