Make it colorful

964 views
Skip to first unread message

Sam Stamport

unread,
Dec 31, 2020, 3:30:59 PM12/31/20
to mementodatabase
Another newbie question.

I'd like to have a colorful to do list. Something like Cool Memo & To Do Tasks Colourful Reminder Notes - Apps on Google Play except the ability to color the background of each field as well as all the other stuff. 

I've done some research and cannot find an app or a Windows program like this. 

Sometimes black text on a white background is too harsh on the eyes. Excel has very nice fill colors, for example.

Thanks!

Beth Dixon

unread,
Dec 31, 2020, 3:59:12 PM12/31/20
to Sam Stamport, mementodatabase
You can set the background color of each entry per your requirements.  Also you can change it to be white text on black background.

Here is my code that sets background color for animals:

Create a JavaScript field and call it Color of Background...change var as ie: var toDo = field(your single choice field)

You can hide this field.  When done go to Main, and select Entry Background Color.

var animal = field("Animal Type")
if (animal == "🐐 Goat")
"#e9d3ff";

else if (animal == "🐔 Chicken")
"#f9d590";

else if (animal == "🐮 Cow")
"#eaded2";

else if (animal == "🐷 Pig")
"#ffeff4";

else if (animal == "🐑 Sheep")
"#e0d9df";

else if (animal == "🐰 Rabbit")
"#fffbc9";



--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/d753b14b-1a12-41aa-87e3-1dd2abb880fen%40googlegroups.com.

Gilles Mons

unread,
Jan 1, 2021, 2:17:20 AM1/1/21
to Beth Dixon, Sam Stamport, mementodatabase
Bonjour,

Pour moi c'est le plus gros défaut de la version PC, il n'y a pas de mode sombre, est c'est pour cela que je ne l'utilise pas souvent...

Hello,

For me this is the biggest flaw of the PC version, there is no dark mode, that's why I don't use it often ...

Bill Crews

unread,
Jan 1, 2021, 3:10:22 AM1/1/21
to Gilles Mons, Beth Dixon, Sam Stamport, mementodatabase
In general, I think mobile OSes, browsers, & other apps -- running inside or outside a browser -- are considerably more compliant than those of desktops & laptops in general. At least that seems to be true for my working set, which is Chrome; various apps from Google, Memento, Evernote, Zoho, and so on, and web apps of various sorts.

All my essential apps support dark mode, though some  web apps still haven't come around. I'm fully dark mode everywhere I can get it, and no auto -- just dark mode.

I wish there was some standard way apps could interact with screens that used a standard mapping of text foreground & background colors for light & dark modes. I often get sites that color their text, and because there isn't a standard interface method like I described, I get foreground colors that are dark gray, dark blue, dark green, etc, which I can barely read or can't read against my black backgrounds -- too little contrast between foreground & background colors.

For example -- flipping a very dark, say, purple to a very light purple in dark mode and flipping a very light purple to a very dark purple in light mode to maintain the contrast of foreground against background. Once into designing it, I bet contrast could be maintained with colored backgrounds, not only black & white ones, like dark gray or dark blue & offwhites like bone or ivory through beige & ecru on up to tan.

I think I'll post a message like this in forums that might actually do something to make it happen, which doesn't really include the Memento forum, as we're mostly focused on getting things done, not developing tools for getting things done.

Thanks for reading this far, if you did.

Beth Dixon

unread,
Jan 1, 2021, 10:22:17 AM1/1/21
to Bill Crews, Gilles Mons, Sam Stamport, mementodatabase
Hi Sam, I have attached an example of how background colors work in mobile version.  Unfortunately only the option to change color of entry is available in Desktop version, not background color.  In Desktop it is just a colored bar on the left side of the entry.  Have I understood correctly?

Can you please let us know what you think?

Beth
Screenshot_20210101-100721_Memento Database.jpg

Bill Crews

unread,
Jan 1, 2021, 1:17:18 PM1/1/21
to Beth Dixon, Gilles Mons, Sam Stamport, mementodatabase
Yeah, this is another example confirming that mobile has one codebase and desktop another. Mostly all desktop platforms, though; that could be worse.

Nice-looking file attachment!

Sam Stamport

unread,
Jan 1, 2021, 1:35:52 PM1/1/21
to mementodatabase
Thanks to everyone for their insightful comments. I've learned a lot from this discussion.

Sam

Jon Boy

unread,
Jan 2, 2021, 2:05:20 AM1/2/21
to mementodatabase
I also would love a dark mode, can't stand light apps anymore, I put a request in the uservoice thing so votes would be appreciated, it might get it going.

Bill Crews

unread,
Jan 2, 2021, 2:51:15 AM1/2/21
to Jon Boy, mementodatabase
Mobile Memento has offered dark mode for quite some time now.

In the libraries list screen, tap the 3-line line (hamburger) menu, scroll to the bottom, and tap Settings|View|Theme|Choosing a theme for libraries|Dark mode.

Jon Boy

unread,
Jan 2, 2021, 1:03:38 PM1/2/21
to mementodatabase
yeah sorry I meant desktop, I like the mobile memento but can't do lots of data entry on my phone.

Sam Stamport

unread,
Jan 2, 2021, 4:30:57 PM1/2/21
to mementodatabase
I found "entry color" & "entry background color", but despite searching help I cannot find out how to use it.

Please help.

Beth Dixon

unread,
Jan 2, 2021, 5:11:14 PM1/2/21
to Sam Stamport, mementodatabase
Hi Sam, I provided instructions earlier in this post.  Perhaps I can walk you through it with a few more details from you.

1.  This is for mobile version, right?
2.  Your library is a to do list?
3.  What information do you want to have a background color on...for example, a different color for each day of the week?
4.  Can you provide a screenshot of your library fields?  From library/edit.

Answering these questions will allow me to help you better.

Beth

Sam Stamport

unread,
Jan 2, 2021, 6:25:18 PM1/2/21
to mementodatabase
Hi Beth,

Sorry to be so dense.

I used the Android app. What a pain to use that tiny keyboard!

This is a to do list.

I wanted the background of all the fields (like your animals snapshot above) to have a specific color based on my Category field.

Screenshot_20210102-172003.png

Sam Stamport

unread,
Jan 2, 2021, 6:34:22 PM1/2/21
to mementodatabase
My Java Script
Screenshot_20210102-173316.png

Beth Dixon

unread,
Jan 2, 2021, 6:34:51 PM1/2/21
to Sam Stamport, mementodatabase
Hi there Sam, not dense at all.  I see you have created the JavaScript field.  In the Library edit screen did you go to Main tab,  and select that field as your Background entry color?  Also, just in case, can you send me the code you have entered in your JavaScript field?  


Screenshot_20210102-172003.png

Beth Dixon

unread,
Jan 2, 2021, 6:41:14 PM1/2/21
to Sam Stamport, mementodatabase
Yep, looks good, you just need to Add JavaScript libraries.

Beth

On Sat., Jan. 2, 2021, 6:38 p.m. Beth Dixon, <beth.ea...@gmail.com> wrote:
Give me a sec to catch up to you...

On Sat., Jan. 2, 2021, 6:37 p.m. Beth Dixon, <beth.ea...@gmail.com> wrote:
Yep, first you need to select the JavaScript libraries...

On Sat., Jan. 2, 2021, 6:37 p.m. Sam Stamport, <sam.st...@gmail.com> wrote:
Guess it's something wrong with my Java Script coding. I selected Category as my background entry field on Main.

Bill Crews

unread,
Jan 2, 2021, 7:31:42 PM1/2/21
to Jon Boy, mementodatabase
No, it's I who is sorry.

I started with Memento 3.7. We didn't need to say mobile than, as there was no desktop edition, I think for a couple of years; I don't have records older than March 2016, when we already had desktop 0.5.7, but it was quite new then.

Sam Stamport

unread,
Jan 3, 2021, 9:03:43 AM1/3/21
to mementodatabase
I added spaces in the "if" statement, but still no color.

I'm trying to wrap my brain around how this works. I get that the code sets the color based on the field I choose. Entry background color apparently integrates into the code, but I don't see the need for this since the field is referenced in the code.

The big question I have is once the color is set, how does it know which fields to add a background color?

Thanks,
Sam

Er Mo

unread,
Jan 3, 2021, 9:41:50 AM1/3/21
to mementodatabase
Hallo
Du musst der Bibliothek sagen von wo sie die Farbe bekommt . Unter Einstellungen ( wo du den Namen der Bibliothek vergibst ) gibt es ein Feld mit " Hintergrundfarbe eingeben "  . Da kannst du das Feld auswählen das die Farbe bestimmt .

Hi there
You have to tell the library where to get the paint from. Under Settings (where you assign the name of the library) there is a field with "Enter background color". You can choose the field that determines the color.

Beth Dixon

unread,
Jan 3, 2021, 9:45:02 AM1/3/21
to Sam Stamport, mementodatabase
So, the code is referring to an item in your single choice field.  It adds a background color to all entries that have Garden selected as your category.  The code says that "If" the field "Category" is "Garden" meaning true...then do this.  If not true the entry will be left as white...or black depending on the display theme you have chosen.

Also, try setting the field to Execute Script in Real time.

In my example I have a single choice field populated with a list of animals.  Goats, cows, pigs, sheep, chickens, and rabbits.  I want my entries to show a different color for each animal.  

Just to confirm, you have set the Background color in Edit library/Main tab to your hidden JavaScript field?

You have an entry with "Garden" as a category?

Beth








John WOLFE

unread,
Jan 13, 2021, 2:24:22 PM1/13/21
to memento...@googlegroups.com

Am I also dense? Rather than using JavaScript; under the field ANIMAL TYPE go to your list entries (🐔 CHICKEN, 🐷 PIG, 🐮 COW, 🐴 HORSE, 🐼 PANDA, 😛 ETC) and click on color. Assign a color and use that field (ANIMAL TYPE) when you pick your background color.

On 1/2/21 5:40 PM, Beth Dixon wrote:
Yep, looks good, you just need to Add JavaScript libraries.

Beth

On Sat., Jan. 2, 2021, 6:38 p.m. Beth Dixon, <beth.ea...@gmail.com> wrote:
Give me a sec to catch up to you...

On Sat., Jan. 2, 2021, 6:37 p.m. Beth Dixon, <beth.ea...@gmail.com> wrote:
Yep, first you need to select the JavaScript libraries...

On Sat., Jan. 2, 2021, 6:37 p.m. Sam Stamport, <sam.st...@gmail.com> wrote:
Guess it's something wrong with my Java Script coding. I selected Category as my background entry field on Main.

On Sat, Jan 2, 2021 at 5:34 PM Beth Dixon <beth.ea...@gmail.com> wrote:
Hi there Sam, not dense at all.  I see you have created the JavaScript field.  In the Library edit screen did you go to Main tab,  and select that field as your Background entry color?  Also, just in case, can you send me the code you have entered in your JavaScript field?  
On Sat., Jan. 2, 2021, 6:25 p.m. Sam Stamport, <sam.st...@gmail.com> wrote:
Hi Beth,

Sorry to be so dense.

I used the Android app. What a pain to use that tiny keyboard!

This is a to do list.

I wanted the background of all the fields (like your animals snapshot above) to have a specific color based on my Category field.

(image)

Timothy Leung

unread,
Apr 16, 2021, 10:14:51 PM4/16/21
to mementodatabase
I have also tried to make an entry colorful with a short script but keep getting an ”undefined” errorSmartSelect_20210417-101043_Memento Database.jpg
Please give me a hint as to what I've done wrong.

Gilles Mons

unread,
Apr 17, 2021, 12:53:34 AM4/17/21
to Timothy Leung, mementodatabase
Try

var bp = field("Reading");
if (( bp > 130 ) && ( bp > 150 ))
"#ff0000"
else
"#ffff00"



--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.

Bill Crews

unread,
Apr 17, 2021, 3:12:15 AM4/17/21
to Gilles Mons, Timothy Leung, mementodatabase
I think the second > was supposed to be a <.

Timothy Leung

unread,
Apr 17, 2021, 6:17:11 AM4/17/21
to mementodatabase
Thanks to all who chimed in, I sorted it out and it works now.
Reply all
Reply to author
Forward
0 new messages