MCPcopy Create free account
hub / github.com/TodePond/ScreenPond / getSplash

Function getSplash

libraries/habitat-embed.js:213–220  ·  view source on GitHub ↗
(red, green, blue)

Source from the content-addressed store, hash-verified

211 };
212
213 const getSplash = (red, green, blue) => {
214 const closestRed = getClosest(red, reds).toString();
215 const closestGreen = getClosest(green, greens).toString();
216 const closestBlue = getClosest(blue, blues).toString();
217 const string = closestRed + closestGreen + closestBlue;
218 const splash = parseInt(string);
219 return splash;
220 };
221
222 const getClosest = (number, array) => {
223 let highscore = Infinity;

Callers 1

habitat-embed.jsFile · 0.85

Calls 1

getClosestFunction · 0.85

Tested by

no test coverage detected