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
- Host: GitHub
- URL: https://github.com/austindd/rescript-chalk
- Owner: austindd
- License: mit
- Created: 2020-12-30T01:26:42.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-07T08:16:49.000Z (about 5 years ago)
- Last Synced: 2025-10-29T21:48:36.166Z (5 months ago)
- Topics: chalk, rescript-bindings
- Language: ReScript
- Homepage:
- Size: 103 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)
```