@pbroom/color-kit/driverMulti color
removeMultiColorEntry
Removes an entry. Removing the selected entry selects the first remaining one (or null). No-op for an unknown id.
import { removeMultiColorEntry } from '@pbroom/color-kit/driver';multi-color-state.ts:583function removeMultiColorEntry(
model: MultiColorModel,
id: string,
): MultiColorModel;Parameters
- id
string
Returns
Example
import { createMultiColorModel, removeMultiColorEntry } from '@pbroom/color-kit/driver';
const model = createMultiColorModel({ colors: { bg: '#ffffff', fg: '#3b82f6' } });
const next = removeMultiColorEntry(model, 'bg');
next.order; // → ['fg']
next.selectedId; // → 'fg'