ESC 256 colors - src-highlite.git - src-highlite

index : src-highlite.git
src-highlite
summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLorenzo Bettini <bettini@dsi.unifi.it>2012年04月14日 18:27:42 +0200
committerLorenzo Bettini <bettini@dsi.unifi.it>2012年04月14日 18:27:42 +0200
commit06238b150b5fe428c49155fa3a7e3a79f07dbb8b (patch)
tree24a2d9130f344cc226081611164265e04bbbea2e /src
parent9e0c098f7f84cc2d5e6433a104cee21b5b5bb0df (diff)
downloadsrc-highlite-06238b150b5fe428c49155fa3a7e3a79f07dbb8b.tar.gz
ESC 256 colors
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am 3
-rw-r--r--src/esc256.outlang 53
-rw-r--r--src/esc256.style 42
-rw-r--r--src/outlang.map 1
4 files changed, 98 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index d3fc9a2..2381577 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -95,6 +95,7 @@ tml_macrosdelayed1.lang tml_macrotokens.lang
OUTLANGFILES = \
css_common.outlang \
esc.outlang \
+esc256.outlang \
html_common.outlang \
html_ref.outlang \
html_notfixed.outlang \
@@ -116,7 +117,7 @@ odf.outlang \
mediawiki.outlang
-STYLEFILES = texinfo.style esc.style lilypond.style
+STYLEFILES = texinfo.style esc.style esc256.style lilypond.style
source_highlightdata_DATA = \
$(LANGFILES) $(LANGFILES_NOTTOCHECK) $(OUTLANGFILES) \
diff --git a/src/esc256.outlang b/src/esc256.outlang
new file mode 100644
index 0000000..eecbb3a
--- /dev/null
+++ b/src/esc256.outlang
@@ -0,0 +1,53 @@
+extension "txt"
+
+styletemplate "\x1b[$stylem$text\x1b[m"
+color "00;38;05;$style"
+
+colormap
+"blue" "75"
+"darkblue" "33"
+"gray" "242"
+"green" "70"
+"orange" "208"
+"purple" "171"
+"red" "196"
+"white" "255"
+"yellow" "226"
+default "255"
+end
+
+
+####################
+# Code color help
+#####################
+
+# 256 code color control template:
+# Code : 033円[AA;FF;BBm
+# AA (attributes) : 00|01|03|04|05|07|22|23|24|25|27
+# FF (foreground) : 38;05;color
+# BB (background) : 48;05;color
+# color : 000-255
+
+# Attributes meaning
+# 00 Reset
+# 01 Bold
+# 03 Italic
+# 04 Underline
+# 05 Blink (doesn't work when a background is set)
+# 07 Reverse (swap foreground and background)
+# 22 No Bold
+# 23 No Italic
+# 24 No Underline
+# 25 No Blink
+# 27 No Reverse
+
+# Any of AA,FF,BB may be omited.
+# Reset code (default color/attribute): 033円[m
+
+# Examples:
+# -> Hello world in color 226 (=> yellow):
+# echo -e "033円[38;05;226mHello, World"
+# -> Hello world in bold blanking yellow:
+# echo -e "033円[01;05;38;05;226mHello, World"
+# -> Hello world in bold yellow with a red background:
+# echo -e "033円[01;38;05;226;48;05;196mHello, World"
diff --git a/src/esc256.style b/src/esc256.style
new file mode 100644
index 0000000..7b1b720
--- /dev/null
+++ b/src/esc256.style
@@ -0,0 +1,42 @@
+classname orange ;
+comment gray ;
+function blue;
+keyword purple ;
+preproc darkblue ;
+regexp orange ;
+string red ;
+todo yellow ;
+type green ;
+usertype orange ;
+variable green ;
+
+// diff files
+oldfile red ;
+newfile green ;
+difflines darkblue ;
+
+// ChangeLog and log files
+date blue ;
+file red ;
+ip orange ;
+name green ;
+time darkblue ;
+
+// line numbers
+linenum yellow ;
+
+// Internet related
+url blue ;
+
+// for css
+selector purple ;
+property blue ;
+value green ;
+
+// ===== Useless =====
+// cbracket
+// normal
+// number
+// specialchar
+// symbol
+// ====
diff --git a/src/outlang.map b/src/outlang.map
index 36b4b9f..9797fb9 100644
--- a/src/outlang.map
+++ b/src/outlang.map
@@ -5,6 +5,7 @@ xhtml = xhtml.outlang
xhtmltable = xhtmltable.outlang
xhtml-css = xhtmlcss.outlang
esc = esc.outlang
+esc256 = esc256.outlang
latex = latex.outlang
latexcolor = latexcolor.outlang
texinfo = texinfo.outlang
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月30日 11:50:53 +0000

AltStyle によって変換されたページ (->オリジナル) /