|
@@ -8,8 +8,6 @@ import { NumberArray } from '../../mol-util/type-helpers';
|
|
|
import { Vec3 } from '../../mol-math/linear-algebra';
|
|
|
import { Hcl } from './spaces/hcl';
|
|
|
import { Lab } from './spaces/lab';
|
|
|
-import { ParamDefinition as PD } from '../../mol-util/param-definition';
|
|
|
-import { objectForEach } from '../object';
|
|
|
|
|
|
/** RGB color triplet expressed as a single number */
|
|
|
export type Color = { readonly '@type': 'color' } & number
|
|
@@ -176,13 +174,5 @@ export function getAdjustedColorMap<T extends { [k: string]: number }>(map: Colo
|
|
|
return adjustedMap as ColorMap<T>;
|
|
|
}
|
|
|
|
|
|
-export function getColorMapParams<T extends { [k: string]: number }>(map: ColorMap<T>) {
|
|
|
- const colors: Record<string, PD.Color> = {};
|
|
|
- objectForEach(map, (_, k) => {
|
|
|
- colors[k] = PD.Color(map[k]);
|
|
|
- });
|
|
|
- return colors as { [k in keyof T]: PD.Color };
|
|
|
-}
|
|
|
-
|
|
|
export type ColorSwatch = [string, Color][]
|
|
|
export function ColorSwatch(l: [string, number][]) { return l as unknown as ColorSwatch; }
|