[WordPress] 外掛分享: WebKew Image Dominant Color Generator

首頁外掛目錄 › WebKew Image Dominant Color Generator
WordPress 外掛 WebKew Image Dominant Color Generator 的封面圖片
10+
安裝啟用
★★★★★
5/5 分(1 則評價)
590 天前
最後更新
問題解決
WordPress 5.5+ PHP 7.4+ v1.0.0 上架:2024-08-28

內容簡介

### 摘要:
這是一個 WordPress 外掛,能自動為上傳至 WordPress 媒體庫的圖片生成一個包含 6 種顏色的調色板。除了調色板,它還會生成一個主導顏色,而這個顏色可以被生成的調色板中的顏色覆蓋。所有生成的顏色都是十六進位值。

### 問題與答案:
<ul>
<li><strong>如何使用這個外掛提供的 shortcode?</strong></li>
<ul>
<li>使用這個外掛提供的 shortcode [webkew_dc field_name=" " override_field=" " ],可回傳任何特定圖像的主導顏色。</li>
</ul>
<li><strong>這個 shortcode 的一個使用案例是什麼?</strong></li>
<ul>
<li>當你是一家網頁代理公司,想為你建立的每個客戶專案建立網頁時,你可以根據客戶的品牌/標誌顏色或特定顏色,為每個頁面設定一個背景色。這個外插將自動為你生成主導顏色,並透過 shortcode 提供給你。</li>
</ul>
<li><strong>這個 shortcode 還提供了哪些彈性選項?</strong></li>
<ul>
<li><strong>field_name:</strong> 可以是圖像自訂欄位的名稱,或者字串"featured",以選擇文章/頁面/自訂類型文章的特色圖像。在這裡指定的圖像的主導顏色將以十六進位值返回。</li>
<li><strong>override_field:</strong> 忽略先前欄位提供的主導顏色,並使用文章/頁面/自訂類型文章中另一個自訂欄位的名稱。在此欄位指定的顏色將以十六進位值返回。</li>
</ul>
<li><strong>如果在 field_name 中指定的圖像沒有主導顏色,且 override_field 為空,該外掛會回傳什麼值?</strong></li>
<ul>
<li>如果在 field_name 中指定的圖像沒有主導顏色,且 override_field 為空,該 shortcode 將返回在 WordPress管理面板的「設定 -> 一般」部分中設定的後備顏色值。</li>
</ul>
</ul>

外掛標籤

開發者團隊

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

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

原文外掛簡介

A WordPress plugin that automatically generates a colors palette (6 colors) for any uploaded image to the WordPress media
library. In addition, to the colors palette, it generates a dominant color which can be overridden by color from the generated colors palette.
All generated colors are hexadecimal values.
This plugin provides a shortcode [webkew_dc field_name=”” override_field=””] which can returns a dominant color of any specific image specified using the shortcode parameters.
One use-case of this shortcode is the following: You are a web agency, and you want to create webpage for every client’s project you have built. You want to give each page a background color that’s based on the color of the client’s brand/logo or any specific color you specify.
Instead of assigning the colors manually, this plugin will generate the dominant color automatically for you and the shortcode will provide you with that color.
The shortcode gives you also some flexibility by using parameters when using the shortcode:
1. field_name: this could be the name of image custom field or the string “featured” to select the featured image of the post/page/custom post type. The dominant color of the image specified here will be returned as a hexadecimal value.
2. override_field: ignore the dominant color provided by the previous field and use the name of another custom field in post/page/custom post type. The color specified in this field will be returned as a hexadecimal value.
If the image specified in field_name doesn’t have a dominant color, and the override_field is empty, the shortcode will return the value of the fallback color which can be set in the WordPress admin panel under Settings –> General section.

延伸相關外掛

文章
Filter
Mastodon