--- a/client/src/components/SessionSummary.js Sat Dec 01 02:38:21 2018 +0100
+++ b/client/src/components/SessionSummary.js Mon Dec 03 17:53:37 2018 +0100
@@ -9,7 +9,12 @@
<div className="session-summary-list">
<ul className="list-group sticky-left">
{notes.map((note) => {
- const bgColor = note.categories.length > 0 ? Color(note.categories[0].color).lighten(0.5).hex() : "transparent";
+ let bgColor = "transparent";
+ if(note.categories.length > 0) {
+ const hsl = Color(note.categories[0].color).hsl();
+ const l = hsl.lightness();
+ bgColor = hsl.lighten(50.0/l-0.5).hex();
+ }
return (
<li className="list-group-item border-0 py-1" key={note._id}>
<a href={'#note-' + note._id}>