[WordPress] 外掛分享: ACF Color Swatches

首頁外掛目錄 › ACF Color Swatches
1,000+
安裝啟用
★★★★★
5/5 分(1 則評價)
2663 天前
最後更新
問題解決
WordPress 4.0+ PHP 5.6+ v1.0.7 上架:2018-02-13

內容簡介

這是一個 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版本)

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.7) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「ACF Color Swatches」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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)

延伸相關外掛

文章
Filter
Apply Filters
Mastodon