UNPKG

simple-color-functions

Version:
8 lines (7 loc) 143 B
export const limit = ( c: number, min: number = 0, max: number = 255 ): number => { return Math.min(Math.max(min, c), max); };