MCPcopy Create free account
hub / github.com/HtmlUnit/htmlunit / hue2rgb

Function hue2rgb

src/test/resources/libraries/html2canvas/html2canvas.js:1800–1819  ·  view source on GitHub ↗
(t1, t2, hue)

Source from the content-addressed store, hash-verified

1798 return 0;
1799 };
1800 function hue2rgb(t1, t2, hue) {
1801 if (hue < 0) {
1802 hue += 1;
1803 }
1804 if (hue >= 1) {
1805 hue -= 1;
1806 }
1807 if (hue < 1 / 6) {
1808 return (t2 - t1) * hue * 6 + t1;
1809 }
1810 else if (hue < 1 / 2) {
1811 return t2;
1812 }
1813 else if (hue < 2 / 3) {
1814 return (t2 - t1) * 6 * (2 / 3 - hue) + t1;
1815 }
1816 else {
1817 return t1;
1818 }
1819 }
1820 var hsl = function (context, args) {
1821 var tokens = args.filter(nonFunctionArgSeparator);
1822 var hue = tokens[0], saturation = tokens[1], lightness = tokens[2], alpha = tokens[3];

Callers 1

hslFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…