wp_tinycolor_hue_to_rgb

函数


wp_tinycolor_hue_to_rgb ( $p, $q, $t )
Access
Private
参数
  • (float)
    $p
    first component.
    Required:
  • (float)
    $q
    second component.
    Required:
  • (float)
    $t
    third component.
    Required:
返回值
  • (float) R, G, or B component.
相关
  • https://github.com/bgrins/TinyColor
定义位置
  • wp-includes/block-supports/duotone.php
    , line 131
引入
5.8.0
弃用

hsl到rgb转换的Helper函数。

直接移植了TinyColor的函数,略微简化以保持与TinyColor的一致性。与TinyColor的一致性。

function wp_tinycolor_hue_to_rgb( $p, $q, $t ) {
	if ( $t  1 ) {
		$t -= 1;
	}
	if ( $t