Repository navigation
@openpresentation/opf-editor 0.23.0
·
25 commits
to main
since this release
- RR-96: chart colors.
setChartOptionsandprepareChartOptionsacceptcolors(chart.colors, the colors by position: a hex color, a scheme slot such asaccent3that keeps following the deck, or avar:color variable;nullor""leaves a position to the deck palette;nullfor the whole value removes the field; at most 24,CHART_COLORS_MAX), as one undoable patch.readChartOptionsreportscolors(what a position means: the plotted series, the slices or rows of a pie, doughnut, treemap or funnel, or the colors of a histogram, pareto or waterfall, and the scheme slots to offer) andstate.colors. The chart options panel gains a "Colors" group with the deck's accent swatches, a "Default" choice and a hex field per position, and "Reset to deck palette". New/color-slotsentry point:readSchemeSlotsreads the deck's resolved scheme slots for swatches. The opf-render preview drawschart.colorsonce opf-render#256 lands. - RR-96 (needs core 0.23 for
design.variant): color variant pickers. New/design-variantsentry point:setDesignVariantandprepareDesignVariantsetdesign.variant(a background slotlight1,light2,dark1ordark2, written as the slot name, or{ background, accents }when the six accents are reordered;nullremoves it) at the deck or on one slide withslideIndex, as one undoable patch, withclearSlideOverridesand ashadowedlist for the slides whose own variant or theme-slot background hides a deck change;readDesignVariantreads the own and the effective variant (core's resolution) andvariantSwatchesthe four variants as colors built from the deck's own scheme slots, like PowerPoint's Variants gallery;normalizeVariantvalidates. The design controls gain a "Color variant" section (four swatches, "Same as presentation" on a slide, an accent order control and "Reset accent order"); the editor imports core'snormalizeColorVariant, so it needs core 0.23. The preview and the PowerPoint export read the variant from core's roles.