ctrem

Crates.ioctrem
lib.rsctrem
version0.1.4
sourcesrc
created_at2022-09-25 07:52:23.082162
updated_at2022-09-26 12:25:24.383151
descriptionPrint colored and styled text
homepagehttps://github.com/Brijeshkrishna/cterm
repository
max_upload_size
id673476
size13,527
Brijesh Krishna (Brijeshkrishna)

documentation

https://docs.rs/ctrem/0.1.4/ctrem/index.html

README

Ctrem

print colored and styled text

CLI Examples

$ctrem "[bold]H[/]ello"

Rust Example

use ctrem::*;

cprintln("[bold][blink]Hello[/], world![/]"); 

prints Hello, world! in bold and blinks Hello

Available style

  • Default
  • Bold
  • Dim
  • Italic
  • Underline
  • Blink
  • Normal
  • Reverse
  • Strike

Available colors

  • Black
  • Red
  • Green
  • Yellow
  • Blue
  • Magenta
  • Cyan
  • White

Supported 8bit (256) also 24 bit (16.7 million) colors

Foreground is default , for background use ' * '

Cterm supported different styles and colors styles or colors palette must be inclosed in [palette] and ends with [/]

  • For bold text use [bold]some text[/]

  • For underline text use [underline] some text[/]

  • For RGB colored text use [rgb 25,55,55]some text[/] or [#b366b1]some text[/]

  • For 4bit colors use [color 4]some text[/]

command palette must end , use [//] to end all

Foreground is default , for background use ' * '

Rust Example Colors

use ctrem::*;
fn main(){
    cprintln("[bold][blink][red]Hello[//],[green]world[*blue]![//]"); 
}
Commit count: 0

cargo fmt