wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_tinycolor_hue_to_rgb is private and should not be used in themes or plugins directly.
wp_tinycolor_hue_to_rgb › WordPress Function
Seit5.8.0
Veraltet6.3.0
› wp_tinycolor_hue_to_rgb ( $p, $q, $t )
| Zugriff: |
|
| Parameter: (3) |
|
| Links: | |
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Helper function for hsl to rgb conversion.
Direct port of TinyColor's function, lightly simplified to maintain consistency with TinyColor.Ähnliche Funktionen: wp_tinycolor_hsl_to_rgb, wp_tinycolor_rgb_to_rgb, wp_tinycolor_string_to_rgb, wp_tinycolor_bound01, wp_color_scheme_settings
Quellcode
function wp_tinycolor_hue_to_rgb( $p, $q, $t ) {
_deprecated_function( __FUNCTION__, '6.3.0' );
if ( $t < 0 ) {
++$t;
}
if ( $t > 1 ) {
--$t;
}
if ( $t < 1 / 6 ) {
return $p + ( $q - $p ) * 6 * $t;
}
if ( $t < 1 / 2 ) {
return $q;
}
if ( $t < 2 / 3 ) {
return $p + ( $q - $p ) * ( 2 / 3 - $t ) * 6;
}
return $p;
}