标 题: [教程]ascii图中需要注意的几个细节
发信站: BBS 水木清华站 (Thu Sep 5 13:28:33 2002), 站内信件
还是先看例子吧
~▄ _▁_
◢ls200 ◣
"."
_◥█ -- ◤_
▄▅▇ ̄▅▄
这是阿丑的原型.
现在很多人用ansieditor做ascii图,它有一个毛病,就是对第一个字符的亮暗不
能准确表示,所以这里需要自己手动加上 *[0m 或者 *[1m ,其中 *[0m是关闭前面
的一切属性,前景色按低亮显示,而 *[1m 是前景色高亮显示
低亮高亮
所以同样一种颜色在作为前景的时候有低亮和高亮两种显示,而背景只有低亮一种
变化(一些特殊的term除外)。
高亮低亮可以产生很多的变化,使用低亮的时候就需要注意下面的这个细节了:
*[0m 不光使前景变为低亮,而且也去掉了原来设置的背景色,这种情况在使用黑
色作为默认背景的term中并不太明显,但如果您的term默认背景不是黑色就显得特
别别扭,背景参差不齐的。
解决的方法有几种:
1、ansieditor的图默认都是黑色背景的,所以自己要手工在 *[0m里加上背景色的
控制码,比如:改成 *[0;40m
2、根本就不用黑色背景,一律用系统的默认背景,这时您就要避免使用 *[40m 这
样的代码了。对于普通的字符都好办的,但对于例子阿丑的脚就又有了新的问题,
这实际是用黑色做前景,棕色做背景来让大家认为棕色的前景。而此时如果仍然用
原来的代码,则这个地方多出一块黑色,很难看,解决的办法是利用 *[7m 反色!
*[7m 反色,也就是此时前景色当背景色,背景色当前景色。这就可以解决阿丑
脚的问题了。相信您已经想到了办法。如果还没想出来,就看看开头例子的代码吧
。8)(不过还有提醒您一句,用完了反色可别忘了恢复回来)
掌握的代码 *[0m *[1m *[7m
Title: [Tutorial] Several details that need to be paid attention to in ascii diagrams
Sending station: BBS Shuimu Tsinghua Station Thu Sep 5 13:28:33 2002, site mail
Let’s look at examples first
ls200
"."
This is the prototype of A Chou.
Nowadays, many people use Ansieditor to make ASCII images. It has a problem, that is, the brightness of the first character is not correct.
It can be expressed accurately, so you need to manually add *[0m or *[1m here, where *[0m is the front of closing
All attributes of the foreground color are displayed with low highlighting and *[1m is the foreground color with highlighting
low light highlight
Therefore, when the same color is used as the foreground, it has two displays: low brightness and high brightness, while the background only has one low brightness display.
Changes except for some special terms
High brightness and low brightness can produce a lot of changes. When using low brightness, you need to pay attention to the following details.
*[0m not only makes the foreground low-light, but also removes the original background color. In this case, when using black
It's not very obvious in a term with color as the default background, but it will look special if your term's default background is not black.
Don't be awkward. The background is uneven.
There are several solutions
1 Ansieditor's pictures have a black background by default, so you have to manually add the background color to *[0m
Control code, for example, change to *[0;40m
2. Do not use black background at all. Always use the default background of the system. At this time, you should avoid using *[40m
This kind of code is easy to handle for ordinary characters, but for the example of A Chou's feet, there are new problems.
This actually uses black as the foreground and brown as the background to make everyone think that the foreground is brown. At this time, if you still use
In the original code, there is an extra piece of black in this place, which is ugly. The solution is to use *[7m to invert the color.
*[7m reverse color, that is, the foreground color is used as the background color at this time, and the background color is the current scene. This can solve A Chou's problem.
There is a problem with your feet. I believe you have already thought of a solution. If you haven’t figured it out yet, just take a look at the code of the example at the beginning.
8 But here’s a reminder: don’t forget to restore it after you’ve used it.
Mastered code *[0m *[1m *[7m