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

Function rgb

src/test/resources/libraries/html2canvas/html2canvas.js:1788–1799  ·  view source on GitHub ↗
(_context, args)

Source from the content-addressed store, hash-verified

1786 return 0;
1787 };
1788 var rgb = function (_context, args) {
1789 var tokens = args.filter(nonFunctionArgSeparator);
1790 if (tokens.length === 3) {
1791 var _a = tokens.map(getTokenColorValue), r = _a[0], g = _a[1], b = _a[2];
1792 return pack(r, g, b, 1);
1793 }
1794 if (tokens.length === 4) {
1795 var _b = tokens.map(getTokenColorValue), r = _b[0], g = _b[1], b = _b[2], a = _b[3];
1796 return pack(r, g, b, a);
1797 }
1798 return 0;
1799 };
1800 function hue2rgb(t1, t2, hue) {
1801 if (hue < 0) {
1802 hue += 1;

Callers

nothing calls this directly

Calls 3

packFunction · 0.85
filterMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected