wp_tinycolor_rgb_to_rgb
函数
wp_tinycolor_rgb_to_rgb ( $rgb_color )
- Access
- Private
- 参数
-
-
(array)
$rgb_color
RGB object.- Required: 是
-
(array)
- 返回值
-
- (array) Rounded and converted RGB object.
- 相关
-
- https://github.com/bgrins/TinyColor
- 定义位置
-
-
wp-includes/block-supports/duotone.php
, line 107
-
wp-includes/block-supports/duotone.php
- 引入
- 5.8.0
- 弃用
- –
Rounds and converts values of an RGB object.
Direct port of TinyColor’s function, lightly simplified to maintain
consistency with TinyColor.
function wp_tinycolor_rgb_to_rgb( $rgb_color ) { return array( 'r' => wp_tinycolor_bound01( $rgb_color['r'], 255 ) * 255, 'g' => wp_tinycolor_bound01( $rgb_color['g'], 255 ) * 255, 'b' => wp_tinycolor_bound01( $rgb_color['b'], 255 ) * 255, ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。