function getKey (color, prec=2) {
const jch = cam02.jch(color)
let rc = '', j, c, h
if(prec < 0){
const k = -prec
const ck = k/2
const jk = k/3
j = Math.round(+jch.J / jk) * jk
c = Math.round(+jch.C / ck) * ck
h = Math.round(+jch.h / k) * k
}
else{
j = jch.J.toFixed(prec)
c = jch.C.toFixed(prec)
h = jch.h.toFixed(prec)
}
return d3.color(cam02.jch(j,c,h)).hex()
}