UNPKG

@macrostrat/column-components

Version:

React rendering primitives for stratigraphic columns

16 lines (15 loc) 432 B
import Color from "../Color.js"; import index from "./index.js"; const { sqrt, pow } = Math; const lrgb = (col1, col2, f) => { const [x1, y1, z1] = col1._rgb; const [x2, y2, z2] = col2._rgb; return new Color( sqrt(pow(x1, 2) * (1 - f) + pow(x2, 2) * f), sqrt(pow(y1, 2) * (1 - f) + pow(y2, 2) * f), sqrt(pow(z1, 2) * (1 - f) + pow(z2, 2) * f), "rgb" ); }; index.lrgb = lrgb; //# sourceMappingURL=lrgb.js.map