An open API service indexing awesome lists of open source software.

https://github.com/austindd/rescript-chalk

ReScript bindings to the 'Chalk' string style library
https://github.com/austindd/rescript-chalk

chalk rescript-bindings

Last synced: about 1 month ago
JSON representation

ReScript bindings to the 'Chalk' string style library

Awesome Lists containing this project

README

          

# rescript-chalk
ReScript bindings to the `Chalk` library for displaying styled text in the terminal. Includes colors, background colors, and other modifiers like `underline` and `italic` font styles.

## Usage

Just start with the base value, `Chalk.chalk`, and then build up the styles you want using `Chalk`'s style functions.

```rescript
let style = {
open Chalk
chalk->keyword(#palegreen)->bgHsl(~h=260, ~s=60, ~l=50)->italic->bold
}

let fancyText = Chalk.apply(style, "A picture is worth a thousand words")

Js.log(fancyText)
```