UNPKG

@thewtex/vtk.js-esm

Version:

Visualization Toolkit for the Web

27 lines (21 loc) 624 B
import { n as nogamma, g as gamma } from './color.js'; import { r as rgb$1 } from '../../d3-color/src/color.js'; var rgb = (function rgbGamma(y) { var color = gamma(y); function rgb(start, end) { var r = color((start = rgb$1(start)).r, (end = rgb$1(end)).r), g = color(start.g, end.g), b = color(start.b, end.b), opacity = nogamma(start.opacity, end.opacity); return function(t) { start.r = r(t); start.g = g(t); start.b = b(t); start.opacity = opacity(t); return start + ""; }; } rgb.gamma = rgbGamma; return rgb; })(1); export { rgb as r };