⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tty-colors.el

📁 windows版本的emacs
💻 EL
📖 第 1 页 / 共 3 页
字号:
;;; tty-colors.el --- color support for character terminals;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.;; Author: Eli Zaretskii <eliz@is.elta.co.il>;; Maintainer: FSF;; Keywords: terminals, faces;; This file is part of GNU Emacs.;; GNU Emacs is free software; you can redistribute it and/or modify;; it under the terms of the GNU General Public License as published by;; the Free Software Foundation; either version 2, or (at your option);; any later version.;; GNU Emacs is distributed in the hope that it will be useful,;; but WITHOUT ANY WARRANTY; without even the implied warranty of;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the;; GNU General Public License for more details.;; You should have received a copy of the GNU General Public License;; along with GNU Emacs; see the file COPYING.  If not, write to the;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,;; Boston, MA 02111-1307, USA.;;; Commentary:;; Emacs support for colors evolved from the X Window System; color;; support for character-based terminals came later.  Many Lisp;; packages use color names defined by X and assume the availability;; of certain functions that look up colors, convert them to pixel;; values, etc.;; This file provides a more or less useful emulation of the X color;; functionality for character-based terminals, and thus relieves the;; rest of Emacs from including special code for this case.;; Here's how it works.  The support for terminal and MSDOS frames;; maintains an alist, called `tty-defined-color-alist', which;; associates colors supported by the terminal driver with small;; integers.  (These small integers are passed to the library;; functions which set the color, and are effectively indices of the;; colors in the supported color palette.)  When Emacs needs to send a;; color command to the terminal, the color name is first looked up in;; `tty-defined-color-alist'.  If not found, functions from this file;; can be used to map the color to one of the supported colors.;; Specifically, the X RGB values of the requested color are extracted;; from `color-name-rgb-alist' and then the supported color is found;; with the minimal distance in the RGB space from the requested;; color.;; `tty-defined-color-alist' is created at startup by calling the;; function `tty-color-define', defined below, passing it each;; supported color, its index, and its RGB values.  The standard list;; of colors supported by many Unix color terminals, including xterm,;; FreeBSD, and GNU/Linux, is supplied below in `tty-standard-colors'.;; If your terminal supports different or additional colors, call;; `tty-color-define' from your `.emacs' or `site-start.el'.  For;; more-or-less standard definitions of VGA text-mode colors, see the;; beginning of lisp/term/pc-win.el.;;; Code:;; The following list is taken from rgb.txt distributed with X.;;;; WARNING: Some colors, such as "lightred", do not appear in this;; list.  If you think it's a good idea to add them, don't!  The;; problem is that the X-standard definition of "red" actually;; corresponds to "lightred" on VGA (that's why pc-win.el and;; w32-fns.el define "lightred" with the same RGB values as "red";; below).  Adding "lightred" here would therefore create confusing;; and counter-intuitive results, like "red" and "lightred" being the;; same color.  A similar situation exists with other "light*" colors.;;;; Nevertheless, "lightred" and other similar color names *are*;; defined for the MS-DOS and MS-Windows consoles, because the users;; on those systems expect these colors to be available.;;;; For these reasons, package maintaners are advised NOT to use color;; names such as "lightred" or "lightblue", because they will have;; different effect on different displays.  Instead, use "red1" and;; "blue1", respectively.(defvar color-name-rgb-alist  '(("snow"		255 250 250)    ("ghostwhite"	248 248 255)    ("whitesmoke"	245 245 245)    ("gainsboro"	220 220 220)    ("floralwhite"	255 250 240)    ("oldlace"		253 245 230)    ("linen"		250 240 230)    ("antiquewhite"	250 235 215)    ("papayawhip"	255 239 213)    ("blanchedalmond"	255 235 205)    ("bisque"		255 228 196)    ("peachpuff"	255 218 185)    ("navajowhite"	255 222 173)    ("moccasin"		255 228 181)    ("cornsilk"		255 248 220)    ("ivory"		255 255 240)    ("lemonchiffon"	255 250 205)    ("seashell"		255 245 238)    ("honeydew"		240 255 240)    ("mintcream"	245 255 250)    ("azure"		240 255 255)    ("aliceblue"	240 248 255)    ("lavender"		230 230 250)    ("lavenderblush"	255 240 245)    ("mistyrose"	255 228 225)    ("white"		255 255 255)    ("black"		0 0 0)    ("darkslategray"	47 79 79)    ("darkslategrey"	47 79 79)    ("dimgray"		105 105 105)    ("dimgrey"		105 105 105)    ("slategray"	112 128 144)    ("slategrey"	112 128 144)    ("lightslategray"	119 136 153)    ("lightslategrey"	119 136 153)    ("gray"		190 190 190)    ("grey"		190 190 190)    ("lightgrey"	211 211 211)    ("lightgray"	211 211 211)    ("midnightblue"	25 25 112)    ("navy"		0 0 128)    ("navyblue"		0 0 128)    ("cornflowerblue"	100 149 237)    ("darkslateblue"	72 61 139)    ("slateblue"	106 90 205)    ("mediumslateblue"	123 104 238)    ("lightslateblue"	132 112 255)    ("mediumblue"	0 0 205)    ("royalblue"	65 105 225)    ("blue"		0 0 255)    ("dodgerblue"	30 144 255)    ("deepskyblue"	0 191 255)    ("skyblue"		135 206 235)    ("lightskyblue"	135 206 250)    ("steelblue"	70 130 180)    ("lightsteelblue"	176 196 222)    ("lightblue"	173 216 230)    ("powderblue"	176 224 230)    ("paleturquoise"	175 238 238)    ("darkturquoise"	0 206 209)    ("mediumturquoise"	72 209 204)    ("turquoise"	64 224 208)    ("cyan"		0 255 255)    ("lightcyan"	224 255 255)    ("cadetblue"	95 158 160)    ("mediumaquamarine"	102 205 170)    ("aquamarine"	127 255 212)    ("darkgreen"	0 100 0)    ("darkolivegreen"	85 107 47)    ("darkseagreen"	143 188 143)    ("seagreen"		46 139 87)    ("mediumseagreen"	60 179 113)    ("lightseagreen"	32 178 170)    ("palegreen"	152 251 152)    ("springgreen"	0 255 127)    ("lawngreen"	124 252 0)    ("green"		0 255 0)    ("chartreuse"	127 255 0)    ("mediumspringgreen"	0 250 154)    ("greenyellow"	173 255 47)    ("limegreen"	50 205 50)    ("yellowgreen"	154 205 50)    ("forestgreen"	34 139 34)    ("olivedrab"	107 142 35)    ("darkkhaki"	189 183 107)    ("khaki"		240 230 140)    ("palegoldenrod"	238 232 170)    ("lightgoldenrodyellow"	250 250 210)    ("lightyellow"	255 255 224)    ("yellow"		255 255 0)    ("gold"		255 215 0)    ("lightgoldenrod"	238 221 130)    ("goldenrod"	218 165 32)    ("darkgoldenrod"	184 134 11)    ("rosybrown"	188 143 143)    ("indianred"	205 92 92)    ("saddlebrown"	139 69 19)    ("sienna"		160 82 45)    ("peru"		205 133 63)    ("burlywood"	222 184 135)    ("beige"		245 245 220)    ("wheat"		245 222 179)    ("sandybrown"	244 164 96)    ("tan"		210 180 140)    ("chocolate"	210 105 30)    ("firebrick"	178 34 34)    ("brown"		165 42 42)    ("darksalmon"	233 150 122)    ("salmon"		250 128 114)    ("lightsalmon"	255 160 122)    ("orange"		255 165 0)    ("darkorange"	255 140 0)    ("coral"		255 127 80)    ("lightcoral"	240 128 128)    ("tomato"		255 99 71)    ("orangered"	255 69 0)    ("red"		255 0 0)    ("hotpink"		255 105 180)    ("deeppink"		255 20 147)    ("pink"		255 192 203)    ("lightpink"	255 182 193)    ("palevioletred"	219 112 147)    ("maroon"		176 48 96)    ("mediumvioletred"	199 21 133)    ("violetred"	208 32 144)    ("magenta"		255 0 255)    ("violet"		238 130 238)    ("plum"		221 160 221)    ("orchid"		218 112 214)    ("mediumorchid"	186 85 211)    ("darkorchid"	153 50 204)    ("darkviolet"	148 0 211)    ("blueviolet"	138 43 226)    ("purple"		160 32 240)    ("mediumpurple"	147 112 219)    ("thistle"		216 191 216)    ("snow1"		255 250 250)    ("snow2"		238 233 233)    ("snow3"		205 201 201)    ("snow4"		139 137 137)    ("seashell1"	255 245 238)    ("seashell2"	238 229 222)    ("seashell3"	205 197 191)    ("seashell4"	139 134 130)    ("antiquewhite1"	255 239 219)    ("antiquewhite2"	238 223 204)    ("antiquewhite3"	205 192 176)    ("antiquewhite4"	139 131 120)    ("bisque1"		255 228 196)    ("bisque2"		238 213 183)    ("bisque3"		205 183 158)    ("bisque4"		139 125 107)    ("peachpuff1"	255 218 185)    ("peachpuff2"	238 203 173)    ("peachpuff3"	205 175 149)    ("peachpuff4"	139 119 101)    ("navajowhite1"	255 222 173)    ("navajowhite2"	238 207 161)    ("navajowhite3"	205 179 139)    ("navajowhite4"	139 121 94)    ("lemonchiffon1"	255 250 205)    ("lemonchiffon2"	238 233 191)    ("lemonchiffon3"	205 201 165)    ("lemonchiffon4"	139 137 112)    ("cornsilk1"	255 248 220)    ("cornsilk2"	238 232 205)    ("cornsilk3"	205 200 177)    ("cornsilk4"	139 136 120)    ("ivory1"		255 255 240)    ("ivory2"		238 238 224)    ("ivory3"		205 205 193)    ("ivory4"		139 139 131)    ("honeydew1"	240 255 240)    ("honeydew2"	224 238 224)    ("honeydew3"	193 205 193)    ("honeydew4"	131 139 131)    ("lavenderblush1"	255 240 245)    ("lavenderblush2"	238 224 229)    ("lavenderblush3"	205 193 197)    ("lavenderblush4"	139 131 134)    ("mistyrose1"	255 228 225)    ("mistyrose2"	238 213 210)    ("mistyrose3"	205 183 181)    ("mistyrose4"	139 125 123)    ("azure1"		240 255 255)    ("azure2"		224 238 238)    ("azure3"		193 205 205)    ("azure4"		131 139 139)    ("slateblue1"	131 111 255)    ("slateblue2"	122 103 238)    ("slateblue3"	105 89 205)    ("slateblue4"	71 60 139)    ("royalblue1"	72 118 255)    ("royalblue2"	67 110 238)    ("royalblue3"	58 95 205)    ("royalblue4"	39 64 139)    ("blue1"		0 0 255)    ("blue2"		0 0 238)    ("blue3"		0 0 205)    ("blue4"		0 0 139)    ("dodgerblue1"	30 144 255)    ("dodgerblue2"	28 134 238)    ("dodgerblue3"	24 116 205)    ("dodgerblue4"	16 78 139)    ("steelblue1"	99 184 255)    ("steelblue2"	92 172 238)    ("steelblue3"	79 148 205)    ("steelblue4"	54 100 139)    ("deepskyblue1"	0 191 255)    ("deepskyblue2"	0 178 238)    ("deepskyblue3"	0 154 205)    ("deepskyblue4"	0 104 139)    ("skyblue1"		135 206 255)    ("skyblue2"		126 192 238)    ("skyblue3"		108 166 205)    ("skyblue4"		74 112 139)    ("lightskyblue1"	176 226 255)    ("lightskyblue2"	164 211 238)    ("lightskyblue3"	141 182 205)    ("lightskyblue4"	96 123 139)    ("slategray1"	198 226 255)    ("slategray2"	185 211 238)    ("slategray3"	159 182 205)    ("slategray4"	108 123 139)    ("lightsteelblue1"	202 225 255)    ("lightsteelblue2"	188 210 238)    ("lightsteelblue3"	162 181 205)    ("lightsteelblue4"	110 123 139)    ("lightblue1"	191 239 255)    ("lightblue2"	178 223 238)    ("lightblue3"	154 192 205)    ("lightblue4"	104 131 139)    ("lightcyan1"	224 255 255)    ("lightcyan2"	209 238 238)    ("lightcyan3"	180 205 205)    ("lightcyan4"	122 139 139)    ("paleturquoise1"	187 255 255)    ("paleturquoise2"	174 238 238)    ("paleturquoise3"	150 205 205)    ("paleturquoise4"	102 139 139)    ("cadetblue1"	152 245 255)    ("cadetblue2"	142 229 238)    ("cadetblue3"	122 197 205)    ("cadetblue4"	83 134 139)    ("turquoise1"	0 245 255)    ("turquoise2"	0 229 238)    ("turquoise3"	0 197 205)    ("turquoise4"	0 134 139)    ("cyan1"		0 255 255)    ("cyan2"		0 238 238)    ("cyan3"		0 205 205)    ("cyan4"		0 139 139)    ("darkslategray1"	151 255 255)    ("darkslategray2"	141 238 238)    ("darkslategray3"	121 205 205)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -