UNPKG

chroma-js

Version:

JavaScript library for color conversions

6 lines (4 loc) 109 B
const { min, max } = Math; export default (x, low = 0, high = 1) => { return min(max(low, x), high); };