From 9323764e9ecb03cadb529404bbc5c79bb1f838e1 Mon Sep 17 00:00:00 2001 From: oeyoews Date: Sat, 21 Sep 2024 13:56:30 +0800 Subject: [PATCH] perf: use colour mapping --- .../tiddlers/config/colormapping.multids | 67 +++++++++++++++++++ .../neotw/tiddlers/macros/color-extend.tid | 1 + .../neotw/tiddlers/style/customize-tag.tid | 8 ++- 3 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 plugins/oeyoews/neotw/tiddlers/config/colormapping.multids diff --git a/plugins/oeyoews/neotw/tiddlers/config/colormapping.multids b/plugins/oeyoews/neotw/tiddlers/config/colormapping.multids new file mode 100644 index 0000000000..cf91cb4a98 --- /dev/null +++ b/plugins/oeyoews/neotw/tiddlers/config/colormapping.multids @@ -0,0 +1,67 @@ +title: $:/config/DefaultColourMappings/ + +slate: rgba(100, 116, 139, 0.2) +slate-dark: rgba(148, 163, 184, 0.8) + +gray: rgba(107, 114, 128, 0.2) +gray-dark: rgba(156, 163, 175, 0.8) + +zinc: rgba(113, 113, 122, 0.2) +zinc-dark: rgba(161, 161, 170, 0.8) + +neutral: rgba(115, 115, 115, 0.2) +neutral-dark: rgba(163, 163, 163, 0.8) + +stone: rgba(120, 113, 108, 0.2) +stone-dark: rgba(168, 162, 158, 0.8) + +red: rgba(239, 68, 68, 0.2) +red-dark: rgba(248, 113, 113, 0.8) + +orange: rgba(249, 115, 22, 0.2) +orange-dark: rgba(251, 146, 60, 0.8) + +amber: rgba(245, 158, 11, 0.2) +amber-dark: rgba(252, 211, 77, 0.8) + +yellow: rgba(234, 179, 8, 0.2) +yellow-dark: rgba(250, 204, 21, 0.8) + +lime: rgba(132, 204, 22, 0.2) +lime-dark: rgba(163, 230, 53, 0.8) + +green: rgba(16, 185, 129, 0.2) +green-dark: rgba(52, 211, 153, 0.8) + +emerald: rgba(5, 150, 105, 0.2) +emerald-dark: rgba(16, 185, 129, 0.8) + +teal: rgba(13, 148, 136, 0.2) +teal-dark: rgba(45, 212, 191, 0.8) + +cyan: rgba(6, 182, 212, 0.2) +cyan-dark: rgba(34, 211, 238, 0.8) + +sky: rgba(14, 165, 233, 0.2) +sky-dark: rgba(56, 189, 248, 0.8) + +blue: rgba(59, 130, 246, 0.2) +blue-dark: rgba(96, 165, 250, 0.8) + +indigo: rgba(99, 102, 241, 0.2) +indigo-dark: rgba(129, 140, 248, 0.8) + +violet: rgba(139, 92, 246, 0.2) +violet-dark: rgba(167, 139, 250, 0.8) + +purple: rgba(168, 85, 247, 0.2) +purple-dark: rgba(192, 132, 252, 0.8) + +fuchsia: rgba(217, 70, 239, 0.2) +fuchsia-dark: rgba(232, 121, 249, 0.8) + +pink: rgba(236, 72, 153, 0.2) +pink-dark: rgba(244, 114, 182, 0.8) + +rose: rgba(244, 63, 94, 0.2) +rose-dark: rgba(251, 113, 133, 0.8) diff --git a/plugins/oeyoews/neotw/tiddlers/macros/color-extend.tid b/plugins/oeyoews/neotw/tiddlers/macros/color-extend.tid index dd7087f87e..7ea8994905 100644 --- a/plugins/oeyoews/neotw/tiddlers/macros/color-extend.tid +++ b/plugins/oeyoews/neotw/tiddlers/macros/color-extend.tid @@ -3,6 +3,7 @@ tags: $:/tags/Global + \procedure colour-extend(name,tiddler:"") <$transclude tiddler={{{ [!is[blank]] ~[{$:/palette}addsuffix[/extend]] }}} index=<>/> \end \ No newline at end of file diff --git a/plugins/oeyoews/neotw/tiddlers/style/customize-tag.tid b/plugins/oeyoews/neotw/tiddlers/style/customize-tag.tid index 54f4a16e66..6fc82422f1 100644 --- a/plugins/oeyoews/neotw/tiddlers/style/customize-tag.tid +++ b/plugins/oeyoews/neotw/tiddlers/style/customize-tag.tid @@ -3,9 +3,9 @@ tags: $:/tags/Stylesheet \define tag-ui(tags:'Vue', color:'lime') [data-tag-title="$tags$"] .tc-tag-label { - background-color: <> !important; - border-color: <> !important; - color: <> !important; + background-color: <> !important; + border-color: <> !important; + color: <> !important; } \end @@ -45,3 +45,5 @@ tags: $:/tags/Stylesheet <$transclude $variable="tag-ui" tags=<> color=<> /> + + \ No newline at end of file