[学习记录]彩色字的使用
first_fan
·
2019-01-27 14:34:11
·
个人记录
\color{red}\text{彩} \color{yellow}\text{色} \color{blue}\text{字}
彩色字其实很简单,其基本代码如下
$\color{(你想要的颜色)}\text{你的文字}$
效果:\color{red}\text{Orz}
\colorbox{red}{进}\colorbox{yellow}{阶}\colorbox{blue}{一}\colorbox{lime}{点} 的话,我们可以学习一下关于\colorbox{wheat}{Colorbox的用法}
基本式:$\colorbox {pink} {Boy next door}$
效果:\colorbox {pink} {Boy next door}
\sf\color{gold}\boxed{\colorbox{gold}{\colorbox{orange}{\color{red}{如果再进一阶呢?}}}}
那么就是\text{boxed}的用法了:
基本式:$$\sf\color{blue}\boxed{\colorbox{yellow}{\colorbox{red}{\color{lime}{Boy next door}}}}$$
拆开就是:
$$
\sf
\color{blue}
\boxed
{
\colorbox{yellow}
{
\colorbox{red}
{
\color{lime}{Boy next door}
}
}
}
$$
效果(原谅我的配色,都是为了演示):
\sf\color{blue}\boxed{\colorbox{yellow}{\colorbox{red}{\color{lime}{Boy next door}}}}
接下来一步一步的讲:
sf:字体关键字,目前LuoGu上可用的有:sf,rm两种
(本人仅检测出两种可用,其他字体有时候预览框会显示但是发出去不对)
第一个颜色\text{blue}是指最外框的颜色
最内层是一个简单的文本结构,不需要过多的解释:\color{lime}{Boy next door}
怎么样?学会了吗?这就是colorbox以及boxed的嵌套。(这样做出来的文字会自动居中,但是它必须单独成行)
\color{blue}\boxed{\boxed{\boxed{\boxed{\boxed{\boxed{\boxed{\boxed{\boxed{\boxed{\boxed{\boxed{\boxed{\boxed{\boxed{\boxed{}}}}}}}}}}}}}}}}
\color{white}\colorbox{red}{\colorbox{orange}{\colorbox{yellow}{\colorbox{lime}{\colorbox{darkturquoise}{\colorbox{dodgerblue}{\colorbox{darkviolet}{Rainbow}}}}}}}
就像这样嵌套 皮
又及:十六进制下RGB颜色的\LaTeX表示。
颜色的表示是以三个16进制数表示的,范围在(0-255),分别代表光学三原色:红绿蓝。
对于#abcdef这样的RGB色值
其中#表示十六进制,
ab表示红色的值:十进制下是10*16+11=171;
cd表示绿色的值:十进制下是12*16+13=205;
ef表示蓝色的值:十进制下是14*16+15=239;
由此可见,蓝色的值最大,故整体偏蓝色。
我们已知,三原色相加为白。
而三个颜色值中与最小的一个作差,得到:
红:0;绿:34;蓝:68
剩余的171可以视作变为了白色。
可以推测出图像是淡蓝色,可能含有浅绿色。
代码是:
$\huge\colorbox{#abcdef}{}$
以下是效果:\huge\colorbox{#abcdef}{}
至于到底有哪些颜色可选,请看markdown颜色对照表
小提示:倾斜电脑屏幕食用效果更佳
\color{AliceBlue}\text{AliceBlue}
\color{AntiqueWhite}\text{AntiqueWhite}
\color{Aqua}\text{Aqua}
\color{Aquamarine}\text{Aquamarine}
\color{Azure}\text{Azure}
\color{Beige}\text{Beige}
\color{Bisque}\text{Bisque}
\color{Black}\text{Black}
\color{BlanchedAlmond}\text{BlanchedAlmond}
\color{Blue}\text{Blue}
\color{BlueViolet}\text{BlueViolet}
\color{Brown}\text{Brown}
\color{BurlyWood}\text{BurlyWood}
\color{CadetBlue}\text{CadetBlue}
\color{Chartreuse}\text{Chartreuse}
\color{Chocolate}\text{Chocolate}
\color{Coral}\text{Coral}
\color{CornflowerBlue}\text{CornflowerBlue}
\color{Cornsilk}\text{Cornsilk}
\color{Crimson}\text{Crimson}
\color{Cyan}\text{Cyan}
\color{DarkBlue}\text{DarkBlue}
\color{DarkCyan}\text{DarkCyan}
\color{DarkGoldenRod}\text{DarkGoldenRod}
\color{DarkGray}\text{DarkGray}
\color{DarkGreen}\text{DarkGreen}
\color{DarkKhaki}\text{DarkKhaki}
\color{DarkMagenta}\text{DarkMagenta}
\color{DarkOliveGreen}\text{DarkOliveGreen}
\color{Darkorange}\text{Darkorange}
\color{DarkOrchid}\text{DarkOrchid}
\color{DarkRed}\text{DarkRed}
\color{DarkSalmon}\text{DarkSalmon}
\color{DarkSeaGreen}\text{DarkSeaGreen}
\color{DarkSlateBlue}\text{DarkSlateBlue}
\color{DarkSlateGray}\text{DarkSlateGray}
\color{DarkTurquoise}\text{DarkTurquoise}
\color{DarkViolet}\text{DarkViolet}
\color{DeepPink}\text{DeepPink}
\color{DeepSkyBlue}\text{DeepSkyBlue}
\color{DimGray}\text{DimGray}
\color{DodgerBlue}\text{DodgerBlue}
\color{Feldspar}\text{Feldspar}
\color{FireBrick}\text{FireBrick}
\color{FloralWhite}\text{FloralWhite}
\color{ForestGreen}\text{ForestGreen}
\color{Fuchsia}\text{Fuchsia}
\color{Gainsboro}\text{Gainsboro}
\color{GhostWhite}\text{GhostWhite}
\color{Gold}\text{Gold}
\color{GoldenRod}\text{GoldenRod}
\color{Gray}\text{Gray}
\color{Green}\text{Green}
\color{GreenYellow}\text{GreenYellow}
\color{HoneyDew}\text{HoneyDew}
\color{HotPink}\text{HotPink}
\color{IndianRed}\text{IndianRed}
\color{Indigo}\text{Indigo}
\color{Ivory}\text{Ivory}
\color{Khaki}\text{Khaki}
\color{Lavender}\text{Lavender}
\color{LavenderBlush}\text{LavenderBlush}
\color{LawnGreen}\text{LawnGreen}
\color{LemonChiffon}\text{LemonChiffon}
\color{LightBlue}\text{LightBlue}
\color{LightCoral}\text{LightCoral}
\color{LightCyan}\text{LightCyan}
\color{LightGoldenRodYellow}\text{LightGoldenRodYellow}
\color{LightGrey}\text{LightGrey}
\color{LightGreen}\text{LightGreen}
\color{LightPink}\text{LightPink}
\color{LightSalmon}\text{LightSalmon}
\color{LightSeaGreen}\text{LightSeaGreen}
\color{LightSkyBlue}\text{LightSkyBlue}
\color{LightSlateGray}\text{LightSlateGray}
\color{LightSteelBlue}\text{LightSteelBlue}
\color{LightYellow}\text{LightYellow}
\color{Lime}\text{Lime}
\color{LimeGreen}\text{LimeGreen}
\color{Linen}\text{Linen}
\color{Magenta}\text{Magenta}
\color{Maroon}\text{Maroon}
\color{MediumAquaMarine}\text{MediumAquaMarine}
\color{MediumBlue}\text{MediumBlue}
\color{MediumOrchid}\text{MediumOrchid}
\color{MediumPurple}\text{MediumPurple}
\color{MediumSeaGreen}\text{MediumSeaGreen}
\color{MediumSlateBlue}\text{MediumSlateBlue}
\color{MediumSpringGreen}\text{MediumSpringGreen}
\color{MediumTurquoise}\text{MediumTurquoise}
\color{MediumVioletRed}\text{MediumVioletRed}
\color{MidnightBlue}\text{MidnightBlue}
\color{MintCream}\text{MintCream}
\color{MistyRose}\text{MistyRose}
\color{Moccasin}\text{Moccasin}
\color{NavajoWhite}\text{NavajoWhite}
\color{Navy}\text{Navy}
\color{OldLace}\text{OldLace}
\color{Olive}\text{Olive}
\color{OliveDrab}\text{OliveDrab}
\color{Orange}\text{Orange}
\color{OrangeRed}\text{OrangeRed}
\color{Orchid}\text{Orchid}
\color{PaleGoldenRod}\text{PaleGoldenRod}
\color{PaleGreen}\text{PaleGreen}
\color{PaleTurquoise}\text{PaleTurquoise}
\color{PaleVioletRed}\text{PaleVioletRed}
\color{PapayaWhip}\text{PapayaWhip}
\color{PeachPuff}\text{PeachPuff}
\color{Peru}\text{Peru}
\color{Pink}\text{Pink}
\color{Plum}\text{Plum}
\color{PowderBlue}\text{PowderBlue}
\color{Purple}\text{Purple}
\color{Red}\text{Red}
\color{RosyBrown}\text{RosyBrown}
\color{RoyalBlue}\text{RoyalBlue}
\color{SaddleBrown}\text{SaddleBrown}
\color{Salmon}\text{Salmon}
\color{SandyBrown}\text{SandyBrown}
\color{SeaGreen}\text{SeaGreen}
\color{SeaShell}\text{SeaShell}
\color{Sienna}\text{Sienna}
\color{Silver}\text{Silver}
\color{SkyBlue}\text{SkyBlue}
\color{SlateBlue}\text{SlateBlue}
\color{SlateGray}\text{SlateGray}
\color{Snow}\text{Snow}
\color{SpringGreen}\text{SpringGreen}
\color{SteelBlue}\text{SteelBlue}
\color{Tan}\text{Tan}
\color{Teal}\text{Teal}
\color{Thistle}\text{Thistle}
\color{Tomato}\text{Tomato}
\color{Turquoise}\text{Turquoise}
\color{Violet}\text{Violet}
\color{Wheat}\text{Wheat}
\color{White}\text{White}
\color{WhiteSmoke}\text{WhiteSmoke}
\color{Yellow}\text{Yellow}
\color{YellowGreen}\text{YellowGreen}
怎么样?是不是有一种眼花缭乱的感觉?别愣着了赶快点个赞收藏吧!