精華區beta NTUIB90 關於我們 聯絡資訊
大 綱: 文字顏色的變換 ANSI graphics mode: ⑴ 文字屬性: Text attributes 0 正常屬性 ( All attributes off ) 1 高亮度 ( Bold on ) 4 底線模式 ( Underscore ) (視模擬器而定) 5 閃爍 ( Blink on ) 7 反相 ( Reverse video on ) ⑵ 前景顏色: Foreground colors 30 Black 31 Red 32 Green 33 Yellow 34 Blue 35 Magenta 36 Cyan 37 White ⑶ 背景顏色: Background colors 40 Black 41 Red 42 Green 43 Yellow 44 Blue 45 Magenta 46 Cyan 47 White ┌─必要 語法: *[(Parameter1);(Parameter2);.....(Parameter n)m Ex: 紅色閃爍 (因為Esc Esc鍵在editor 中會被混淆, 故以Ctrl-u 代替) *[31;5m 紅色閃爍 *[37;0m 壓Esc Esc 務必要還原 此時畫面有可能會內縮, 或尚未變色,待儲存後便會正常。   使用上若有任何問題,歡迎告知! 以下為ladios補充: p.s.PTT上ansi識別碼(*)需用Ctrl-u打出來(有的是連按兩下Esc),或是Ctrl-c   則出現完整控制碼。更好的是可用Ctrl-v預視編輯結果,不過在文章結束後要加   上*[0;37m還原,*[m好像也可以。