Typora文本颜色设置

Typora文本颜色设置

  • 前言
  • 方法一:使用markdown语法的内联公式
    • 设置颜色
      • 文本颜色设置公式
      • 常用的颜色公式代码表
      • 效果预览
  • 方法二:使用html代码
    • 设置颜色
      • 文本颜色设置公式
      • 颜色代码
  • 方法三:借助第三方软件AutoHotKey
    • 操作步骤

前言

记录修改typora编辑文本颜色的两种方式

效果如下

这是 R e d 色 \textcolor{Red}{这是Red色} 这是Red

这是 P l u m 色 \textcolor{Plum}{这是Plum色} 这是Plum

方法一:使用markdown语法的内联公式

设置颜色

设置颜色,需要在设置中勾选Markdown扩展语法下的内联公式,然后重启Typora

Typora文本颜色设置_第1张图片

文本颜色设置公式

$\textcolor{颜色名}{文字内容} $

示例:绿色 - $\textcolor{green}{绿色的文字内容} $,效果如下:

$\textcolor{green}{绿色的文字内容} $

常用的颜色公式代码表

$\textcolor{GreenYellow}{颜色:GreenYellow}$
$\textcolor{Yellow}{颜色:Yellow}$   
$\textcolor{Goldenrod}{颜色:Goldenrod}$
$\textcolor{Dandelion}{颜色:Dandelion}$
$\textcolor{Apricot}{颜色:Apricot}$
$\textcolor{Peach}{颜色:Peach}$
$\textcolor{Melon}{颜色:Melon}$
$\textcolor{YellowOrange}{颜色:YellowOrange}$
$\textcolor{Orange}{颜色:Orange}$
$\textcolor{BurntOrange}{颜色:BurntOrange}$
$\textcolor{Bittersweet}{颜色:Bittersweet}$
$\textcolor{RedOrange}{颜色:RedOrange}$
$\textcolor{Mahogany}{颜色:Mahogany}$
$\textcolor{Maroon}{颜色:Maroon}$
$\textcolor{BrickRed}{颜色:BrickRed}$
$\textcolor{Red}{颜色:Red}$
$\textcolor{OrangeRed}{颜色:OrangeRed}$
$\textcolor{RubineRed}{颜色:RubineRed}$
$\textcolor{WildStrawberry}{颜色:WildStrawberry}$
$\textcolor{Salmon}{颜色:Salmon}$
$\textcolor{CarnationPink}{颜色:CarnationPink}$
$\textcolor{Magenta}{颜色:Magenta}$
$\textcolor{VioletRed}{颜色:VioletRed}$
$\textcolor{Rhodamine}{颜色:Rhodamine}$
$\textcolor{Mulberry}{颜色:Mulberry}$
$\textcolor{RedViolet}{颜色:RedViolet}$
$\textcolor{Fuchsia}{颜色:Fuchsia}$
$\textcolor{Lavender}{颜色:Lavender}$
$\textcolor{Thistle}{颜色:Thistle}$
$\textcolor{Orchid}{颜色:Orchid}$
$\textcolor{DarkOrchid}{颜色:DarkOrchid}$
$\textcolor{Purple}{颜色:Purple}$
$\textcolor{Plum}{颜色:Plum}$
$\textcolor{Violet}{颜色:Violet}$
$\textcolor{RoyalPurple}{颜色:RoyalPurple}$
$\textcolor{BlueViolet}{颜色:BlueViolet}$
$\textcolor{Periwinkle}{颜色:Periwinkle}$
$\textcolor{CadetBlue}{颜色:CadetBlue}$
$\textcolor{CornflowerBlue}{颜色:CornflowerBlue}$
$\textcolor{MidnightBlue}{颜色:MidnightBlue}$
$\textcolor{NavyBlue}{颜色:NavyBlue}$
$\textcolor{RoyalBlue}{颜色:RoyalBlue}$
$\textcolor{Blue}{颜色:Blue}$
$\textcolor{Cerulean}{颜色:Cerulean}$
$\textcolor{Cyan}{颜色:Cyan}$
$\textcolor{ProcessBlue}{颜色:ProcessBlue}$
$\textcolor{SkyBlue}{颜色:SkyBlue}$
$\textcolor{Turquoise}{颜色:Turquoise}$
$\textcolor{TealBlue}{颜色:TealBlue}$
$\textcolor{Aquamarine}{颜色:Aquamarine}$
$\textcolor{BlueGreen}{颜色:BlueGreen}$
$\textcolor{Emerald}{颜色:Emerald}$
$\textcolor{JungleGreen}{颜色:JungleGreen}$
$\textcolor{SeaGreen}{颜色:SeaGreen}$
$\textcolor{Green}{颜色:Green}$
$\textcolor{ForestGreen}{颜色:ForestGreen}$
$\textcolor{PineGreen}{颜色:PineGreen}$
$\textcolor{LimeGreen}{颜色:LimeGreen}$
$\textcolor{YellowGreen}{颜色:YellowGreen}$
$\textcolor{SpringGreen}{颜色:SpringGreen}$
$\textcolor{OliveGreen}{颜色:OliveGreen}$
$\textcolor{RawSienna}{颜色:RawSienna}$
$\textcolor{Sepia}{颜色:Sepia}$
$\textcolor{Brown}{颜色:Brown}$
$\textcolor{Tan}{颜色:Tan}$
$\textcolor{Gray}{颜色:Gray}$
$\textcolor{Black}{颜色:Black}$

效果预览

序号 颜色代码 效果
1 $\textcolor{GreenYellow}{颜色:GreenYellow}$ 颜色: G r e e n Y e l l o w \textcolor{GreenYellow}{颜色:GreenYellow} 颜色:GreenYellow
2 $\textcolor{Yellow}{颜色:Yellow}$ 颜色: Y e l l o w \textcolor{Yellow}{颜色:Yellow} 颜色:Yellow
3 $\textcolor{Goldenrod}{颜色:Goldenrod}$ 颜色: G o l d e n r o d \textcolor{Goldenrod}{颜色:Goldenrod} 颜色:Goldenrod
4 $\textcolor{Dandelion}{颜色:Dandelion}$ 颜色: D a n d e l i o n \textcolor{Dandelion}{颜色:Dandelion} 颜色:Dandelion
5 $\textcolor{Apricot}{颜色:Apricot}$ 颜色: A p r i c o t \textcolor{Apricot}{颜色:Apricot} 颜色:Apricot
6 $\textcolor{Peach}{颜色:Peach}$ 颜色: P e a c h \textcolor{Peach}{颜色:Peach} 颜色:Peach
7 $\textcolor{Melon}{颜色:Melon}$ 颜色: M e l o n \textcolor{Melon}{颜色:Melon} 颜色:Melon
8 $\textcolor{YellowOrange}{颜色:YellowOrange}$ 颜色: Y e l l o w O r a n g e \textcolor{YellowOrange}{颜色:YellowOrange} 颜色:YellowOrange
9 $\textcolor{Orange}{颜色:Orange}$ 颜色: O r a n g e \textcolor{Orange}{颜色:Orange} 颜色:Orange
10 $\textcolor{BurntOrange}{颜色:BurntOrange}$ 颜色: B u r n t O r a n g e \textcolor{BurntOrange}{颜色:BurntOrange} 颜色:BurntOrange
11 $\textcolor{Bittersweet}{颜色:Bittersweet}$ 颜色: B i t t e r s w e e t \textcolor{Bittersweet}{颜色:Bittersweet} 颜色:Bittersweet
12 $\textcolor{RedOrange}{颜色:RedOrange}$ 颜色: R e d O r a n g e \textcolor{RedOrange}{颜色:RedOrange} 颜色:RedOrange
13 $\textcolor{Mahogany}{颜色:Mahogany}$ 颜色: M a h o g a n y \textcolor{Mahogany}{颜色:Mahogany} 颜色:Mahogany
14 $\textcolor{Maroon}{颜色:Maroon}$ 颜色: M a r o o n \textcolor{Maroon}{颜色:Maroon} 颜色:Maroon
15 $\textcolor{BrickRed}{颜色:BrickRed}$ 颜色: B r i c k R e d \textcolor{BrickRed}{颜色:BrickRed} 颜色:BrickRed
16 $\textcolor{Red}{颜色:Red}$ 颜色: R e d \textcolor{Red}{颜色:Red} 颜色:Red
17 $\textcolor{OrangeRed}{颜色:OrangeRed}$ 颜色: O r a n g e R e d \textcolor{OrangeRed}{颜色:OrangeRed} 颜色:OrangeRed
18 $\textcolor{RubineRed}{颜色:RubineRed}$ 颜色: R u b i n e R e d \textcolor{RubineRed}{颜色:RubineRed} 颜色:RubineRed
19 $\textcolor{WildStrawberry}{颜色:WildStrawberry}$ 颜色: W i l d S t r a w b e r r y \textcolor{WildStrawberry}{颜色:WildStrawberry} 颜色:WildStrawberry
20 $\textcolor{Salmon}{颜色:Salmon}$ 颜色: S a l m o n \textcolor{Salmon}{颜色:Salmon} 颜色:Salmon
21 $\textcolor{CarnationPink}{颜色:CarnationPink}$ 颜色: C a r n a t i o n P i n k \textcolor{CarnationPink}{颜色:CarnationPink} 颜色:CarnationPink
22 $\textcolor{Magenta}{颜色:Magenta}$ 颜色: M a g e n t a \textcolor{Magenta}{颜色:Magenta} 颜色:Magenta
23 $\textcolor{VioletRed}{颜色:VioletRed}$ 颜色: V i o l e t R e d \textcolor{VioletRed}{颜色:VioletRed} 颜色:VioletRed
24 $\textcolor{Rhodamine}{颜色:Rhodamine}$ 颜色: R h o d a m i n e \textcolor{Rhodamine}{颜色:Rhodamine} 颜色:Rhodamine
25 $\textcolor{Mulberry}{颜色:Mulberry}$ 颜色: M u l b e r r y \textcolor{Mulberry}{颜色:Mulberry} 颜色:Mulberry
26 $\textcolor{RedViolet}{颜色:RedViolet}$ 颜色: R e d V i o l e t \textcolor{RedViolet}{颜色:RedViolet} 颜色:RedViolet
27 $\textcolor{Fuchsia}{颜色:Fuchsia}$ 颜色: F u c h s i a \textcolor{Fuchsia}{颜色:Fuchsia} 颜色:Fuchsia
28 $\textcolor{Lavender}{颜色:Lavender}$ 颜色: L a v e n d e r \textcolor{Lavender}{颜色:Lavender} 颜色:Lavender
29 $\textcolor{Thistle}{颜色:Thistle}$ 颜色: T h i s t l e \textcolor{Thistle}{颜色:Thistle} 颜色:Thistle
30 $\textcolor{Orchid}{颜色:Orchid}$ 颜色: O r c h i d \textcolor{Orchid}{颜色:Orchid} 颜色:Orchid
31 $\textcolor{DarkOrchid}{颜色:DarkOrchid}$ 颜色: D a r k O r c h i d \textcolor{DarkOrchid}{颜色:DarkOrchid} 颜色:DarkOrchid
32 $\textcolor{Purple}{颜色:Purple}$ 颜色: P u r p l e \textcolor{Purple}{颜色:Purple} 颜色:Purple
33 $\textcolor{Plum}{颜色:Plum}$ 颜色: P l u m \textcolor{Plum}{颜色:Plum} 颜色:Plum
34 $\textcolor{Violet}{颜色:Violet}$ 颜色: V i o l e t \textcolor{Violet}{颜色:Violet} 颜色:Violet
35 $\textcolor{RoyalPurple}{颜色:RoyalPurple}$ 颜色: R o y a l P u r p l e \textcolor{RoyalPurple}{颜色:RoyalPurple} 颜色:RoyalPurple
36 $\textcolor{BlueViolet}{颜色:BlueViolet}$ 颜色: B l u e V i o l e t \textcolor{BlueViolet}{颜色:BlueViolet} 颜色:BlueViolet
37 $\textcolor{Periwinkle}{颜色:Periwinkle}$ 颜色: P e r i w i n k l e \textcolor{Periwinkle}{颜色:Periwinkle} 颜色:Periwinkle
38 $\textcolor{CadetBlue}{颜色:CadetBlue}$ 颜色: C a d e t B l u e \textcolor{CadetBlue}{颜色:CadetBlue} 颜色:CadetBlue
39 $\textcolor{CornflowerBlue}{颜色:CornflowerBlue}$ 颜色: C o r n f l o w e r B l u e \textcolor{CornflowerBlue}{颜色:CornflowerBlue} 颜色:CornflowerBlue
40 $\textcolor{MidnightBlue}{颜色:MidnightBlue}$ 颜色: M i d n i g h t B l u e \textcolor{MidnightBlue}{颜色:MidnightBlue} 颜色:MidnightBlue
41 $\textcolor{NavyBlue}{颜色:NavyBlue}$ 颜色: N a v y B l u e \textcolor{NavyBlue}{颜色:NavyBlue} 颜色:NavyBlue
42 $\textcolor{RoyalBlue}{颜色:RoyalBlue}$ 颜色: R o y a l B l u e \textcolor{RoyalBlue}{颜色:RoyalBlue} 颜色:RoyalBlue
43 $\textcolor{Blue}{颜色:Blue}$ 颜色: B l u e \textcolor{Blue}{颜色:Blue} 颜色:Blue
44 $\textcolor{Cerulean}{颜色:Cerulean}$ 颜色: C e r u l e a n \textcolor{Cerulean}{颜色:Cerulean} 颜色:Cerulean
45 $\textcolor{Cyan}{颜色:Cyan}$ 颜色: C y a n \textcolor{Cyan}{颜色:Cyan} 颜色:Cyan
46 $\textcolor{ProcessBlue}{颜色:ProcessBlue}$ 颜色: P r o c e s s B l u e \textcolor{ProcessBlue}{颜色:ProcessBlue} 颜色:ProcessBlue
47 $\textcolor{SkyBlue}{颜色:SkyBlue}$ 颜色: S k y B l u e \textcolor{SkyBlue}{颜色:SkyBlue} 颜色:SkyBlue
48 $\textcolor{Turquoise}{颜色:Turquoise}$ 颜色: T u r q u o i s e \textcolor{Turquoise}{颜色:Turquoise} 颜色:Turquoise
49 $\textcolor{TealBlue}{颜色:TealBlue}$ 颜色: T e a l B l u e \textcolor{TealBlue}{颜色:TealBlue} 颜色:TealBlue
50 $\textcolor{Aquamarine}{颜色:Aquamarine}$ 颜色: A q u a m a r i n e \textcolor{Aquamarine}{颜色:Aquamarine} 颜色:Aquamarine
51 $\textcolor{BlueGreen}{颜色:BlueGreen}$ 颜色: B l u e G r e e n \textcolor{BlueGreen}{颜色:BlueGreen} 颜色:BlueGreen
52 $\textcolor{Emerald}{颜色:Emerald}$ 颜色: E m e r a l d \textcolor{Emerald}{颜色:Emerald} 颜色:Emerald
53 $\textcolor{JungleGreen}{颜色:JungleGreen}$ 颜色: J u n g l e G r e e n \textcolor{JungleGreen}{颜色:JungleGreen} 颜色:JungleGreen
54 $\textcolor{SeaGreen}{颜色:SeaGreen}$ 颜色: S e a G r e e n \textcolor{SeaGreen}{颜色:SeaGreen} 颜色:SeaGreen
55 $\textcolor{Green}{颜色:Green}$ 颜色: G r e e n \textcolor{Green}{颜色:Green} 颜色:Green
56 $\textcolor{ForestGreen}{颜色:ForestGreen}$ 颜色: F o r e s t G r e e n \textcolor{ForestGreen}{颜色:ForestGreen} 颜色:ForestGreen
57 $\textcolor{PineGreen}{颜色:PineGreen}$ 颜色: P i n e G r e e n \textcolor{PineGreen}{颜色:PineGreen} 颜色:PineGreen
58 $\textcolor{LimeGreen}{颜色:LimeGreen}$ 颜色: L i m e G r e e n \textcolor{LimeGreen}{颜色:LimeGreen} 颜色:LimeGreen
59 $\textcolor{YellowGreen}{颜色:YellowGreen}$ 颜色: Y e l l o w G r e e n \textcolor{YellowGreen}{颜色:YellowGreen} 颜色:YellowGreen
60 $\textcolor{SpringGreen}{颜色:SpringGreen}$ 颜色: S p r i n g G r e e n \textcolor{SpringGreen}{颜色:SpringGreen} 颜色:SpringGreen
61 $\textcolor{OliveGreen}{颜色:OliveGreen}$ 颜色: O l i v e G r e e n \textcolor{OliveGreen}{颜色:OliveGreen} 颜色:OliveGreen
62 $\textcolor{RawSienna}{颜色:RawSienna}$ 颜色: R a w S i e n n a \textcolor{RawSienna}{颜色:RawSienna} 颜色:RawSienna
63 $\textcolor{Sepia}{颜色:Sepia}$ 颜色: S e p i a \textcolor{Sepia}{颜色:Sepia} 颜色:Sepia
64 $\textcolor{Brown}{颜色:Brown}$ 颜色: B r o w n \textcolor{Brown}{颜色:Brown} 颜色:Brown
65 $\textcolor{Tan}{颜色:Tan}$ 颜色: T a n \textcolor{Tan}{颜色:Tan} 颜色:Tan
66 $\textcolor{Gray}{颜色:Gray}$ 颜色: G r a y \textcolor{Gray}{颜色:Gray} 颜色:Gray
67 $\textcolor{Black}{Black}$ 颜色: B l a c k \textcolor{Black}{颜色:Black} 颜色:Black

方法二:使用html代码

设置颜色

因为typora支持html语法,所以可以借助html语句来修改文本颜色

文本颜色设置公式

<span style="color:文字颜色;background:背景颜色;font-size:文字大小;font-family:字体;">你要改色的文字span>

示例:绿色 效果如下:

绿色的文字内容

颜色代码

同方法一

方法三:借助第三方软件AutoHotKey

AutoHotKey是一款著名的windows系统快捷键设置的软件,轻便小巧。

官方下载地址: https://autohotkey.com/download/ahk-install.exe

操作步骤

  • 先安装AutoHotKey

  • 创建文本,并输入一下内容

    ; Typora
    ; 快捷增加字体颜色
    ; SendInput {Text} 解决中文输入法问题
     
    #IfWinActive ahk_exe Typora.exe
    {
        ; Ctrl+Alt+O 橙色
        ^!o::addFontColor("orange")
     
        ; Ctrl+Alt+R 红色
        ^!r::addFontColor("red")
     
        ; Ctrl+Alt+B 浅蓝色
        ^!b::addFontColor("cornflowerblue")
    }
     
    ; 快捷增加字体颜色
    addFontColor(color){
        clipboard := "" ; 清空剪切板
        Send {ctrl down}c{ctrl up} ; 复制
        SendInput {TEXT}
        SendInput {ctrl down}v{ctrl up} ; 粘贴
        If(clipboard = ""){
            SendInput {TEXT} ; Typora 在这不会自动补充
        }else{
            SendInput {TEXT}
  • 将文件保存为ahk后缀的文件,如AutoHotKey.ahk

  • 双击运行

  • 在Typora软件里就可以使用快捷键进行想要的修改操作了(想要更多的快捷键设置方式,可以在AutoHotKey.ahk文件中自行添加):

    • 如按 Ctrl+Alt+O 添加橙色, Ctrl+Alt+R 红色,按 Ctrl+\ 取消样式!
  • 也可以右键 AutoHotKey.ahk 脚本文件,点击Compile Script编译脚本成exe程序,就可以不用下载Autohotkey在其他电脑上运行了。

你可能感兴趣的:(Typora,编辑器)