diff --git a/core/palette-templates/TwentyTwenties.tid b/core/palette-templates/TwentyTwenties.tid index b0f42407b..311af62c4 100644 --- a/core/palette-templates/TwentyTwenties.tid +++ b/core/palette-templates/TwentyTwenties.tid @@ -5,6 +5,7 @@ tags: $:/tags/Palette type: application/x-tiddler-dictionary color-scheme: light palette-type: modern +editor: $:/palette-editors/TwentyTwenties # Background and foreground colours, which are interpolated as required base-paper: #FCFFF0 diff --git a/core/palette-templates/TwentyTwentiesEditor.tid b/core/palette-templates/TwentyTwentiesEditor.tid new file mode 100644 index 000000000..aa97770f2 --- /dev/null +++ b/core/palette-templates/TwentyTwentiesEditor.tid @@ -0,0 +1,18 @@ +title: $:/palette-editors/TwentyTwenties + +\procedure actionsRecompilePalette() +<$transclude $variable="actions-compile-palette" inputTitle={{$:/palette}} outputTitle="$:/temp/palette-colours"/> +\end actionsRecompilePalette + +paper: <$edit-text tiddler={{$:/palette}} index="base-paper" type="color" tag="input" inputActions=<>/> + +background: <$edit-text tiddler={{$:/palette}} index="base-background" type="color" tag="input" inputActions=<>/> + +ink: <$edit-text tiddler={{$:/palette}} index="base-ink" type="color" tag="input" inputActions=<>/> + +primary: <$edit-text tiddler={{$:/palette}} index="base-primary" type="color" tag="input" inputActions=<>/> + +secondary: <$edit-text tiddler={{$:/palette}} index="base-secondary" type="color" tag="input" inputActions=<>/> + +tertiary: <$edit-text tiddler={{$:/palette}} index="base-tertiary" type="color" tag="input" inputActions=<>/> + diff --git a/core/ui/ControlPanel/Palette.tid b/core/ui/ControlPanel/Palette.tid index 335a3632d..0d22d9743 100644 --- a/core/ui/ControlPanel/Palette.tid +++ b/core/ui/ControlPanel/Palette.tid @@ -6,6 +6,12 @@ caption: {{$:/language/ControlPanel/Palette/Caption}} {{$:/snippets/paletteswitcher}} +<$let paletteEditor={{{ [{$:/palette}get[editor]] :else[{$:/palette}get[palette-import]!match[]get[editor]] }}}> + <%if [!match[]] %> + <$transclude $tiddler=<> $mode="block"/> + <%endif%> + + <$reveal type="nomatch" state="$:/state/ShowPaletteEditor" text="yes"> <$button set="$:/state/ShowPaletteEditor" setTo="yes"><>