Change color of a word/text

Dudes, I really would like to have just a simple text color to choose in the Obsidian, as in Notion, for example.

mostra

I’m new at Obsidian and i searched in many topics, but i didn’t find, if there’s any way to do that, please show me, otherwise, this is a essential feature.

4 Likes

You can use HTML tag.
Like this: <font color="red"> YOUR TEXT</font>
Or use hex code for more color: <font color="#cc241d"> YOUR TEXT</font>

3 Likes

I like this tip but it applies on the preview mode only.
Is there any way to have this on edit mode as well?
I guess I should modify a CSS snippet but have no idea :frowning:

You can edit CSS so that your italics and bold will change color instead (But you only have 2 color):

/* Different color for bold*/
.cm-strong,
.markdown-preview-section strong {
  color: #BB29BB !important;
}


/* Different color for italic */
.cm-em {
    color: #cc241d;
	font-style: normal !important;
}

/* of italics in Preview  all notes in a vault */
.markdown-preview-section em {
    color: #cc241d !important;
	font-style: normal !important;
}
5 Likes

Thanks @GreenChocho !!

I’m more than happy with 2 colors :smiley::

/* Different color for bold*/
.cm-strong,
.markdown-preview-section strong {
  color: #86da5f;
  font-style: normal !important; 
  font-weight: normal !important;
}

/* Different color for italic */
.cm-em,
.markdown-preview-section em {
  color: #ad5350;
  font-style: normal !important; 
}
2 Likes

expanding on this, what is the syntax to also change the colour in edit mode?

Very much helped out. Thanks!

1 Like