MCPcopy
hub / github.com/jimp-dev/jimp / limit255

Function limit255

packages/utils/src/index.ts:248–253  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

246 * ```
247 */
248export function limit255(n: number) {
249 n = Math.max(n, 0);
250 n = Math.min(n, 255);
251
252 return n;
253}
254
255/**
256 * Converts a css color (Hex, 8-digit (RGBA) Hex, RGB, RGBA, HSL, HSLA, HSV, HSVA, Named) to a hex number

Callers 7

compositeFunction · 0.90
blitFunction · 0.90
brightnessFunction · 0.90
convoluteFunction · 0.90
colorModifierFunction · 0.90
thresholdFunction · 0.90
blurFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…