[wordpress插件] Dominant Color显色

wordpress 插件 文章 2020-04-21 03:41 487 0 全屏看文

AI助手支持GPT4.0

评分
96
描述

A WordPress plugin to automatically save the dominant color and a color palette for an attachment image into post_meta.

一个WordPress插件,可将附件图像的主要颜色和调色板自动保存到post_meta中。

安装步骤

The dominant color and color palette is automatically saved on upload and edit to post meta.

主要颜色和调色板会在上载时自动保存并进行编辑以发布元信息。

You need to then use get_post_meta to retrieve the “dominant_color_hex” or “dominant_color_rgb” meta key.

然后您需要使用get_post_meta来检索“ dominant_color_hex”或“ dominant_color_rgb”元密钥。

hex returns a string, including the #, rgb returns an array with key 0 as red, 1 as green, and 2 as blue.

hex返回一个字符串,包括#,rgb返回一个数组,键0为红色,1为绿色,2为蓝色。

Alternatively, you can use the meta keys “color_palette_rgb” and “color_palette_hex” to get an array of 8 colors that feature prominently in the image.

或者,您也可以使用元键“ color_palette_rgb”和“ color_palette_hex”来获得由8种颜色组成的阵列,这些图像在图像中的显着位置。

下载地址
https://downloads.wordpress.org/plugin/dominant-color.2.1.0.zip
-EOF-

AI助手支持GPT4.0