跳到内容

ACF Color Swatches

v1.0.7

nickforddesign · 2018年2月14日 上架

An add-on for Advanced Custom Fields to allow users to select from a list of color choices. Setting up the field works exactly like setting up a radio …

正在使用
1,000+
评分
5.0 / 5
累计下载
2.1 万
最近更新
2018年11月30日
1 条评价需要 WordPress 4.0+PHP 5.6+

贡献者

截图

Use the same syntax as defining ACF radio buttons
Use the same syntax as defining ACF radio buttons
Users will see color swatches that act like radio buttons
Users will see color swatches that act like radio buttons

An add-on for Advanced Custom Fields to allow users to select from a list of color choices. Setting up the field works exactly like setting up a radio button list, the main difference being that the key will also be used to style the element.

This is useful for allowing users to pick from a limited selection of colors, rather than enter an arbitrary hex value or choose from a color picker.

Supports all of the following color formats:

  • hex: #FF0000
  • rgb: rgb(255,0,0)
  • rgba: rgba(255,0,0, 1)
  • hsl: hsl(0,100%,50%)
  • hsla: hsla(0,100%,50%, 1)
  • name: red

Note: you may also use none to show a transparent swatch with a checkerboard background.

Compatibility

This ACF field type is compatible with:

  • ACF 4
  • ACF 5 (PRO version)

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums