Background colour for RTF notes

Hi all,

I want to make some template notes for use when working. As a lawyer, I am a fan of a soft yellow background for my notes (like a legal pad).

Is it possible to change the background colour for templates? If so, can someone point me in the right direction?

I’ve looked for previous answers, but they are now about 15 years old. Is this possible in DT3?

Thanks very much

Yes, you can.

This is how to change a supplied template: we’ll take the Data > New from Template > Productivity > Note as an example, but the principle is the same for any template, including the ones you write yourself of course.

Go the Templates folder in Finder (you can click on Data > New from Template > Open Templates Folder) and navigate to Productivity > Note.dtTemplate. Right click on this file and choose Show Package Contents.

In the new Finder window, navigate to English.lproj (the principle is the same for other languages, of course) and double click to open Notes.rtf in TextEdit.

In TextEdit, press cmd-t (or Format > Font > Show Fonts) to get the Font dialogue up.

Click on the colour patch next to the little icon which looks like a document and the colour swatch will appear. Choose you new colour — the text background should change with it.

Save the document, go back to DT3 and invoke the Note template: you should find the background of the new document will reflect your changes. Obviously, this will only work for new notes — existing ones will show the old background.

BTW, if you want to change the background for new default RTF notes (Ctl-cmd-n) then I think you have to open up the DT3 application bundle and make the change there, which probably isn’t a good idea unless you know what you’re doing…

HTH.

I think you have to open up the DT3 application bundle and make the change there, which probably isn’t a good idea unless you know what you’re doing…

Definitely not a good idea.
The template idea is the correct (and safe) idea.

1 Like

Quite… if nothing else it’s a pain to have to do every time the app is updated. Still, it would be nice if there was an option to change the default background. Not essential, just nice to have.

Sorry to resurect this old thread but I’m trying to do the same thing as the OP for much the same reasons. Age and eyesight make the glare from a plain white background tiring after a while.

However despite several attempts I haven’t manage to get the above to work. In the current DT 3 you can specifty the background color for new txt and rtf files. This works for plain text in a normal 3 pane view, but for rtf it only works in full screen. I can’t see a logical reason why, but there we are.

All I want is a straightforward blank rtf file with a tinted background: RGB 255 237 217 to be exact. Preferably with a default Helvetica font, that displays as such in a normal 3 pane view.

I’m using DT 3.9.4 on an Intel Mac with Ventura 13.6.4

Thanks for any help.

It’s not the background color for new rich text files but for viewing text documents in full screen document mode (see menu View > Full Screen). However, the above procedure should still work (successfully tested on 13.6.4).

Thank you for the reply.

Not sure what went wrong but it now works! So far so good.

DT3 appears to display different file types at different magnifications. Is it best to set the text at (say) 18pt or the usual 12 pt with a magnification of 150% Would this setting then ‘stick’ or would I need to reset the magnification each time? I have a feeling that the setting in the prefs may over ride anything in the template.

As the magnification is limited to DEVONthink, it might make sense to use a larger font.

As the magnification is limited to DEVONthink, it might make sense to use a larger font.

I’ll do that. Thank you for the help.

Resurrecting an old thread again for the same reason. I’m setting up a new machine with an upgrade to DT4 at the same time. Since it’s a clean install I went through the above procedure again to create an RTF note with a tinted background. Basically template in RTF or preferably RTFD (to include images), in 18pt Helvetica with a background tint of RGB: 277 237 217 or thereabouts.
Despite multiple efforts this doesn’t work as I get the message that TextEdit cannot open files in the .DTtemplate format, so it appears that the possiblity of having a backrground tint has been killed. No doubt I’m doing something wrong but has anyone else tried to do the above procedure with DT4?

EDIT at 12:46 GMT

.dtTemplate is not a rich text file. It is a template package containing a file.

And yes, DEVONthink supports having a colored background on RTF. DEVONthink To Go does not. And whether third-party applications support this as well, we have no control over.

  1. Create a new RTF file.
  2. Click in the contents and press Command-A to select all.
  3. Choose Format > Font > Show Fonts or press Command-T.
  4. Set the foreground and background color wells.
  5. Type into the body to confirm the styling and save the document.
  6. With the document selected, choose File > Export > as Template.

It is now ready to use.

Many thanks for this. I realised after I posted that I needed to ‘show package contents” to reveal the RTF file underneath. I even tried to create an RTF file in TextEdit and substitute that in the template package, something which also failed.
Just one point. I’m probably wrong on this but, is the RTF file in fact RTFD which should work better with images, jpg, png, etc?

You’re welcome.

This is not necessary and is not included in the instructions I provided. Follow them as written.

Just one point. I’m probably wrong on this but, is the RTF file in fact RTFD which should work better with images, jpg, png, etc?

No. An RTF is an RTF. An RTFD is an RTFD. However, adding an attachment to an RTF converts it into an RTFD document, maintaining the background color… simple.

My reference to ‘show package contents’ was before my initial post. At that point I was following the instructions provided by @Brookter which for whatever reason failed to work in DT4. I since followed your variant which works OK so it’s all good.

I think something similar could be done with ‘formatted note’ which would involve opening the package contents and editing the css file. Not sure what the replacement would be to get Font size as 18pt Helvetica and the background as FFEDD9

It would mean replacing the file every time DT was updated, unless a user css file could be placed in the templates folder. aka: myformatted document

A formatted note is not a package file so there is no external CSS to edit.

At it’s base level, this is sufficient for what you mentioned…

<body style="margin:1.5em; font-family:sans-serif; font-size:1rem; background-color:#FFEDD9;">

It would mean replacing the file every time DT was updated, unless a user css file could be placed in the templates folder. aka: myformatted document

?
Why do you think this is the case? You’re not changing anything internal to DEVONthink, nor should you be in the application package. Again, I provided instructions on how to create a simple template and there is no difference in the steps to export a custom formatted note.

Thank you for this, it also works perfectly :grinning_face:

You’re not changing anything internal to DEVONthink, nor should you be in the application package.

My bad. I was thinking that DT updates reinstalled everything when obviously they don’t. The app support stuff is left alone so any mods there shouldn’t be affected.
Thanks again for the clear explanations.

Sorry - spoke too soon…..

This is what I have as MY formatted template ( MY Formatted Note.css ) : which is in DTs App Support templates folder:

body { margin:1.5em; }

body style=“margin:1.5em; font-family:sans-serif; font-size:1rem; background-color:#FFED@media9;”

@media (prefers-color-scheme: dark) {
body, table {
color: #fff;
background-color: hsl(0, 0%, 16%);
}
a:link, a:visited, a:active {
color: hsl(218, 100%, 72%);
}
}

That gives the right background color and font size but it displays the above code in a new document. How can I correct this?

Font size appears to be related to something coded in the app ( 1rem). Is there any way of fine tuning the font size?

This is no CSS. You must adhere to its syntax rules. body style= is not part of them.

That is what we do in CSS in 2026. Relative font size respects the user’s preferences. Specify whatever you want in pixels in DT(TG)'s preferences.

Given my (very) limited knowledge of CSS, I edited an existing css file to incorporate @BLUEFROG’S comment above, or at least I thought I had. Obviously not, so I’ll have another go….

What @bluefrog posted, was an example for a body element with inline styles.
Here’s more on CSS

1 Like