2017-09-20 69 views

回答

3

Crayons可以做到這一點。它增加了一個方法來print_with_color

julia> using Crayons 

julia> print_with_color(Crayon(background = :red), "hello") 
hello 

而且有一對夫婦可以做同樣多的其他語法。正常的printprintln也是過載的,但它們的輸出有多少顏色不同(都給出了整條線的背景)。

另外,還有AnsiColor