From 36daf6604f992647d12175468ceafcb319895408 Mon Sep 17 00:00:00 2001 From: Scott Gigante <84813314+scottgigante-immunai@users.noreply.github.com> Date: Tue, 11 Apr 2023 14:51:15 -0400 Subject: [PATCH 01/12] demo css dynamic colour palette --- results/tasks.css | 6 ++++++ theme-dark.scss | 6 ++++++ theme-light.scss | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/results/tasks.css b/results/tasks.css index 2a70b2bf..ad88bfcb 100644 --- a/results/tasks.css +++ b/results/tasks.css @@ -13,3 +13,9 @@ .card .card-img-top { background-color: var(--bs-white); } + +/* funkyheatmap */ +.quarto-figure svg g:first-child ~ g text ~ rect, .quarto-figure svg g:first-child ~ g text ~ circle { + stroke: var(--bs-body-bg) !important; + filter: hue-rotate(var(--hue-rotate)) brightness(var(--brightness-dim)) invert(var(--invert-colors)) brightness(var(--brightness-lighten)) hue-rotate(var(--hue-rotate)); +} \ No newline at end of file diff --git a/theme-dark.scss b/theme-dark.scss index 3c10613f..16b5f29a 100644 --- a/theme-dark.scss +++ b/theme-dark.scss @@ -18,3 +18,9 @@ $body-bg: #1d2527; --shadow-color: #000; --card-bg-color: #323839; } + +.quarto-figure svg { + --hue-rotate: 90deg; + --brightness-dim: 80%; + --brightness-lighten: 125%; +} \ No newline at end of file diff --git a/theme-light.scss b/theme-light.scss index 80f6d111..116c2880 100644 --- a/theme-light.scss +++ b/theme-light.scss @@ -14,4 +14,10 @@ .card-shadow { --shadow-color: #5a6268; --card-bg-color: #ffffff; +} + +.quarto-figure svg { + --hue-rotate: 0; + --brightness-dim: 100%; + --brightness-lighten: 100%; } \ No newline at end of file From 4a1ce554c8377e053857726a708203a8532c95ab Mon Sep 17 00:00:00 2001 From: Scott Gigante <84813314+scottgigante-immunai@users.noreply.github.com> Date: Tue, 11 Apr 2023 15:17:07 -0400 Subject: [PATCH 02/12] wrong file --- results/task_template.css | 6 ++++++ results/tasks.css | 6 ------ theme-dark.scss | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/results/task_template.css b/results/task_template.css index 4f5163ba..e9f44515 100644 --- a/results/task_template.css +++ b/results/task_template.css @@ -58,3 +58,9 @@ div.dtsp-panesContainer div.dataTables_wrapper div.dataTables_scrollBody { section#details details img.img-fluid { filter: invert(var(--invert-colors)); } + +/* funkyheatmap */ +.quarto-figure svg g:first-child ~ g text ~ rect, .quarto-figure svg g:first-child ~ g text ~ circle { + stroke: var(--bs-body-bg) !important; + filter: hue-rotate(var(--hue-rotate)) brightness(var(--brightness-dim)) invert(var(--invert-colors)) brightness(var(--brightness-lighten)); +} diff --git a/results/tasks.css b/results/tasks.css index ad88bfcb..2a70b2bf 100644 --- a/results/tasks.css +++ b/results/tasks.css @@ -13,9 +13,3 @@ .card .card-img-top { background-color: var(--bs-white); } - -/* funkyheatmap */ -.quarto-figure svg g:first-child ~ g text ~ rect, .quarto-figure svg g:first-child ~ g text ~ circle { - stroke: var(--bs-body-bg) !important; - filter: hue-rotate(var(--hue-rotate)) brightness(var(--brightness-dim)) invert(var(--invert-colors)) brightness(var(--brightness-lighten)) hue-rotate(var(--hue-rotate)); -} \ No newline at end of file diff --git a/theme-dark.scss b/theme-dark.scss index 16b5f29a..7fe66f7e 100644 --- a/theme-dark.scss +++ b/theme-dark.scss @@ -20,7 +20,7 @@ $body-bg: #1d2527; } .quarto-figure svg { - --hue-rotate: 90deg; + --hue-rotate: 180deg; --brightness-dim: 80%; --brightness-lighten: 125%; } \ No newline at end of file From ad6798ecbf88d08513f3713f8981554ff1e160c9 Mon Sep 17 00:00:00 2001 From: Scott Gigante <84813314+scottgigante-immunai@users.noreply.github.com> Date: Wed, 12 Apr 2023 09:39:58 -0400 Subject: [PATCH 03/12] Fix outline --- results/task_template.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/results/task_template.css b/results/task_template.css index e9f44515..942ea6ab 100644 --- a/results/task_template.css +++ b/results/task_template.css @@ -61,6 +61,6 @@ section#details details img.img-fluid { /* funkyheatmap */ .quarto-figure svg g:first-child ~ g text ~ rect, .quarto-figure svg g:first-child ~ g text ~ circle { - stroke: var(--bs-body-bg) !important; + stroke: var(--bs-dark) !important; filter: hue-rotate(var(--hue-rotate)) brightness(var(--brightness-dim)) invert(var(--invert-colors)) brightness(var(--brightness-lighten)); } From 5be05db3e4b0db1bd36081ceb474017888dfae44 Mon Sep 17 00:00:00 2001 From: Nikolay Markov Date: Wed, 19 Apr 2023 10:45:31 -0500 Subject: [PATCH 04/12] style: use funkyheatmap selectors --- results/_blocks/_summary_figure.qmd | 4 ++-- results/task_template.css | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/results/_blocks/_summary_figure.qmd b/results/_blocks/_summary_figure.qmd index f9932f7c..b502aa52 100644 --- a/results/_blocks/_summary_figure.qmd +++ b/results/_blocks/_summary_figure.qmd @@ -150,7 +150,7 @@ funkyheatmap( oddRowBackground: 'var(--bs-body-bg)', evenRowBackground: 'var(--bs-button-hover)', textColor: 'var(--bs-body-color)', - strokeColor: 'var(--bs-body-color)', + strokeColor: 'var(--bs-dark)', headerColor: 'var(--bs-white)', hoverColor: 'var(--bs-body-color)' } @@ -163,6 +163,6 @@ funkyheatmap( funkyheatmap = (await require('d3@7').then(d3 => { window.d3 = d3; window._ = _; - return import('https://unpkg.com/funkyheatmap-js@0.1.8'); + return import('https://unpkg.com/funkyheatmap-js@0.1.9'); })).default; ``` diff --git a/results/task_template.css b/results/task_template.css index 942ea6ab..c25df14c 100644 --- a/results/task_template.css +++ b/results/task_template.css @@ -60,7 +60,6 @@ section#details details img.img-fluid { } /* funkyheatmap */ -.quarto-figure svg g:first-child ~ g text ~ rect, .quarto-figure svg g:first-child ~ g text ~ circle { - stroke: var(--bs-dark) !important; +.quarto-figure .funkyheatmap .fh-geom { filter: hue-rotate(var(--hue-rotate)) brightness(var(--brightness-dim)) invert(var(--invert-colors)) brightness(var(--brightness-lighten)); } From c7248851a2aa896cfbf7e040a594ed21bc3a199f Mon Sep 17 00:00:00 2001 From: Scott Gigante Date: Wed, 19 Apr 2023 15:21:58 -0400 Subject: [PATCH 05/12] more targetd variables --- theme-dark.scss | 5 +++-- theme-light.scss | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/theme-dark.scss b/theme-dark.scss index 7fe66f7e..2603ea60 100644 --- a/theme-dark.scss +++ b/theme-dark.scss @@ -19,8 +19,9 @@ $body-bg: #1d2527; --card-bg-color: #323839; } -.quarto-figure svg { +.quarto-figure .funkyheatmap { --hue-rotate: 180deg; --brightness-dim: 80%; --brightness-lighten: 125%; -} \ No newline at end of file +} + diff --git a/theme-light.scss b/theme-light.scss index 116c2880..aba01739 100644 --- a/theme-light.scss +++ b/theme-light.scss @@ -16,8 +16,9 @@ --card-bg-color: #ffffff; } -.quarto-figure svg { +.quarto-figure .funkyheatmap { --hue-rotate: 0; --brightness-dim: 100%; --brightness-lighten: 100%; -} \ No newline at end of file +} + From a8c6c3fea7f87ab32d37ca7171b38fe4d10908ea Mon Sep 17 00:00:00 2001 From: Scott Gigante Date: Wed, 19 Apr 2023 15:22:37 -0400 Subject: [PATCH 06/12] trailing newlines --- theme-dark.scss | 1 - theme-light.scss | 1 - 2 files changed, 2 deletions(-) diff --git a/theme-dark.scss b/theme-dark.scss index 2603ea60..a75220d6 100644 --- a/theme-dark.scss +++ b/theme-dark.scss @@ -24,4 +24,3 @@ $body-bg: #1d2527; --brightness-dim: 80%; --brightness-lighten: 125%; } - diff --git a/theme-light.scss b/theme-light.scss index aba01739..f1dcaeec 100644 --- a/theme-light.scss +++ b/theme-light.scss @@ -21,4 +21,3 @@ --brightness-dim: 100%; --brightness-lighten: 100%; } - From 7a3e158fffaec2fd8d42b56a3919134627cf0cc6 Mon Sep 17 00:00:00 2001 From: Scott Gigante <84813314+scottgigante-immunai@users.noreply.github.com> Date: Wed, 19 Apr 2023 15:37:59 -0400 Subject: [PATCH 07/12] Update CHANGELOG.md --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3f884e8..90b774d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,12 +36,11 @@ Documentation was added for future OpenProblems v2. This is still in development * `More information/Troubleshooting`: Describes the most common errors that can occur when contributing/developing. -# openproblems.bio v2.1.2 - ## MINOR CHANGES * Updating task images from `.png` to `.svg` (#205). * Set funkyheatmap colors for dark mode via js instead of css (#208). +* Set color palette dynamically for funkyheatmap (#210). # openproblems.bio v2.1.1 From 0a487807d84c584ca8aaa6c0598c8cf8d0e339ee Mon Sep 17 00:00:00 2001 From: Scott Gigante <84813314+scottgigante-immunai@users.noreply.github.com> Date: Fri, 21 Apr 2023 13:15:42 -0400 Subject: [PATCH 08/12] Example: just change the brightness --- theme-dark.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/theme-dark.scss b/theme-dark.scss index a75220d6..2997c10b 100644 --- a/theme-dark.scss +++ b/theme-dark.scss @@ -20,7 +20,7 @@ $body-bg: #1d2527; } .quarto-figure .funkyheatmap { - --hue-rotate: 180deg; + --hue-rotate: 0deg; --brightness-dim: 80%; - --brightness-lighten: 125%; + --brightness-lighten: 100%; } From 6ce409f3253997b30332b447d9b0279b31411da9 Mon Sep 17 00:00:00 2001 From: Scott Gigante <84813314+scottgigante-immunai@users.noreply.github.com> Date: Fri, 21 Apr 2023 14:21:41 -0400 Subject: [PATCH 09/12] Example: don't invert --- theme-dark.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/theme-dark.scss b/theme-dark.scss index 2997c10b..31d055df 100644 --- a/theme-dark.scss +++ b/theme-dark.scss @@ -23,4 +23,5 @@ $body-bg: #1d2527; --hue-rotate: 0deg; --brightness-dim: 80%; --brightness-lighten: 100%; + --invert-colors: 0; } From 0245cd8d69b4d34dfd8bfa06a962c9484f3a2d7f Mon Sep 17 00:00:00 2001 From: Scott Gigante <84813314+scottgigante-immunai@users.noreply.github.com> Date: Mon, 24 Apr 2023 08:59:17 -0400 Subject: [PATCH 10/12] bs-dark back to bs-body-colour because we removed invert --- results/_blocks/_summary_figure.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/results/_blocks/_summary_figure.qmd b/results/_blocks/_summary_figure.qmd index b502aa52..c10b0d88 100644 --- a/results/_blocks/_summary_figure.qmd +++ b/results/_blocks/_summary_figure.qmd @@ -150,7 +150,7 @@ funkyheatmap( oddRowBackground: 'var(--bs-body-bg)', evenRowBackground: 'var(--bs-button-hover)', textColor: 'var(--bs-body-color)', - strokeColor: 'var(--bs-dark)', + strokeColor: 'var(--bs-body-color)', headerColor: 'var(--bs-white)', hoverColor: 'var(--bs-body-color)' } From 68b391d682c687d32a39424c9011ef03d5682c91 Mon Sep 17 00:00:00 2001 From: Scott Gigante <84813314+scottgigante-immunai@users.noreply.github.com> Date: Mon, 24 Apr 2023 11:23:58 -0400 Subject: [PATCH 11/12] Try half as much dimming --- theme-dark.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme-dark.scss b/theme-dark.scss index 31d055df..a7a81977 100644 --- a/theme-dark.scss +++ b/theme-dark.scss @@ -21,7 +21,7 @@ $body-bg: #1d2527; .quarto-figure .funkyheatmap { --hue-rotate: 0deg; - --brightness-dim: 80%; + --brightness-dim: 90%; --brightness-lighten: 100%; --invert-colors: 0; } From 3ee62070a80081690102e93ea2ec431ff19ffcd3 Mon Sep 17 00:00:00 2001 From: Scott Gigante <84813314+scottgigante-immunai@users.noreply.github.com> Date: Mon, 24 Apr 2023 11:26:32 -0400 Subject: [PATCH 12/12] simplify filter --- results/task_template.css | 2 +- theme-dark.scss | 5 +---- theme-light.scss | 2 -- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/results/task_template.css b/results/task_template.css index c25df14c..4c2073d8 100644 --- a/results/task_template.css +++ b/results/task_template.css @@ -61,5 +61,5 @@ section#details details img.img-fluid { /* funkyheatmap */ .quarto-figure .funkyheatmap .fh-geom { - filter: hue-rotate(var(--hue-rotate)) brightness(var(--brightness-dim)) invert(var(--invert-colors)) brightness(var(--brightness-lighten)); + filter: brightness(var(--brightness-dim)); } diff --git a/theme-dark.scss b/theme-dark.scss index a7a81977..ed303a0e 100644 --- a/theme-dark.scss +++ b/theme-dark.scss @@ -20,8 +20,5 @@ $body-bg: #1d2527; } .quarto-figure .funkyheatmap { - --hue-rotate: 0deg; - --brightness-dim: 90%; - --brightness-lighten: 100%; - --invert-colors: 0; + --brightness-dim: 85%; } diff --git a/theme-light.scss b/theme-light.scss index f1dcaeec..b941f6dd 100644 --- a/theme-light.scss +++ b/theme-light.scss @@ -17,7 +17,5 @@ } .quarto-figure .funkyheatmap { - --hue-rotate: 0; --brightness-dim: 100%; - --brightness-lighten: 100%; }