內容簡介
這是一個 Advanced Custom Fields(高級自訂欄位)的外掛,讓使用者可以從顏色選擇列表中選擇顏色。設定欄位與設定單選按鈕列表一樣,主要的差別在於 key 值也會被用來設置元素的樣式。
這對於允許使用者從有限的顏色選擇中選擇,而不是輸入任意的十六進制值或從調色板中選擇,是非常有用的。
支援以下所有顏色格式:
十六進制:#FF0000
RGB:rgb(255,0,0)
RGBA:rgba(255,0,0, 1)
HSL:hsl(0,100%,50%)
HSLA:hsla(0,100%,50%, 1)
名稱:red
注意:您也可以使用 none 以顯示具有棋盤格背景的透明色塊。
兼容性
這個 ACF 欄位類型與以下版本相容:
ACF 4
ACF 5(PRO版本)
外掛標籤
開發者團隊
原文外掛簡介
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)
