Use Markdown to write blog posts and set font color

1 Introduction

When editing the blog with markdown, I found that there is no instruction to modify the font color in the syntax description. The following is the format for modifying the text color in the blog.

2. HEX values ​​and names corresponding to several commonly used colors

Below are the corresponding HEX values ​​and names of several commonly used colors. You can modify them to the desired color using a fixed format.

color color HEX color name
red\color{red}{red}red #FF0000 red
blue\color{blue}{blue}blue #0000FF blue
Orange\color{orange}{orange}orange color #FF7D00 orange
green\color{green}{green}green #008000 green
bright green\color{lime}{bright green}bright green #00FF00 lime
magenta (new name) \color{magenta}{magenta (new name)}Fuchsia (new name) #FF00FF magenta
black\color{black}{black}black #000000 black
Brown\color{brown}{brown}brown #A52A2A brown
purple\color{purple}{purple}Purple #800080 purple

3. Example

Command: (example in blue)

//格式一、
$\color{
    
    blue}{
    
    文本内容}$//注意:前后两个$衔接的内容之前不能空格
或者
$\color{
    
    0000FF}{
    
    文本内容}$  
//格式二、
<font color='blue'> 文本内容 </font> //注意:color后接的等号两边不能空格
或者
<font color=0000FF> 文本内容 </font>

Note:
Insert image description here
The font used in format 2 is the same as the font without changing the font color. If the font in method 1 is changed, the format used in method 2 is still used to change the color.
Insert image description here

Guess you like

Origin blog.csdn.net/weixin_42640280/article/details/127196118