Skip to content
KeystoneJS LogoKeystoneJS
👋🏻 Keystone 5 has officially moved to maintenance only. For the latest release of Keystone please visit the Keystone website.

Color

This is the last active development release of this package as Keystone 5 is now in a 6 to 12 month active maintenance phase. For more information please read our Keystone 5 and beyond post.

Stores hexadecimal RGBA (Red, Green, Blue, Alpha) color values. Presented in the Admin UI as an interactive color picker.

Usage

JS
const { Color } = require('@keystonejs/fields-color');

keystone.createList('Product', {
  fields: {
    heroColor: { type: Color },
  },
});

Config

OptionTypeDefaultDescription
isRequiredBooleanfalseDoes this field require a value?
isUniqueBooleanfalseAdds a unique index that allows only unique values to be stored

On this page

  • Usage
  • Config
Edit on GitHub