Showing posts with label Color. Show all posts
Showing posts with label Color. Show all posts

Saturday, October 25, 2008

CSS border-color 说明

设置Block Element的边框属性是比较常见的,如:

.divBorder {
border: #ddd 5px solid;
}

但有时候Block Element需要设置一个宽度,却不需要设置颜色,可将border-color设置为transparent,如下所示:
.divBorder {
border: transparent 5px solid;
}

Friday, June 20, 2008

vim syntax highlight under mac

$> vi ~/.vimrc
set nocompatible
syntax on

$> mkdir -p ~/.vim/colors
$> vi ~/.vim/colors/test.vim
" customize color scheme in test.vim
" colorscheme test

In mac leopard, there are many colorscheme included, these are in “/usr/share/vim/vim70/colors/”

reference: http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/index.html

Sunday, March 16, 2008

Enable terminal colorized output and print out chinese character

$> man ls
.....


-G Enable colorized output. This option is equivalent to defining
CLICOLOR in the environment. (See below.)
-w Force raw printing of non-printable characters. This is the
default when output is not to a terminal.

If you want terminal can display chinese character and colorized output, you should add a line to ~/.bashrc or ~/.profile or ~/.bash_profile:
alias ls='ls -wG'
or:
alias ll='ls -lawG'

Thursday, December 06, 2007

Gvim中自动进行编码匹配和加载选定的配色方案

"自动进行编码匹配
set fileencodings=gb2312,ucs-bom,utf-8,chinese
"加载配色方案
colorscheme murphy

Sunday, June 03, 2007

prints a color table of 8bg * 8fg * 2 states (regular/bold)


#!/bin/bash

# prints a color table of 8bg * 8fg * 2 states (regular/bold)
echo
echo Table for 16-color terminal escape sequences.
echo Replace ESC with \\033 in bash.
echo
echo "Background | Foreground colors"
echo "---------------------------------------------------------------------"
for((bg=40;bg<=47;bg++)); do
for((bold=0;bold<=1;bold++)) do
echo -en "\033[0m"" ESC[${bg}m | "
for((fg=30;fg<=37;fg++)); do
if [ $bold == "0" ]; then
echo -en "\033[${bg}m\033[${fg}m [${fg}m "
else
echo -en "\033[${bg}m\033[1;${fg}m [1;${fg}m"
fi
done
echo -e "\033[0m"
done
echo "--------------------------------------------------------------------- "
done

echo
echo

colortable16.sh
shell> ruby -e 'print "\e[33m"'
shell> ruby -e 'print "\e[0m"'
shell> ruby -e 'print "\e[1m"'
shell> printf "\e[0m"
shell> echo -e "\e[1m"
shell> echo -e "\033[47m\033[1;31mBright red on white.\033[0m"