Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hunghg255/ungradient
Gradient text terminal
https://github.com/hunghg255/ungradient
gradient npm terminal text-gradients
Last synced: about 2 months ago
JSON representation
Gradient text terminal
- Host: GitHub
- URL: https://github.com/hunghg255/ungradient
- Owner: hunghg255
- License: mit
- Created: 2023-08-30T08:27:55.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-10T05:54:18.000Z (about 1 year ago)
- Last Synced: 2024-01-10T07:07:55.694Z (about 1 year ago)
- Topics: gradient, npm, terminal, text-gradients
- Language: TypeScript
- Homepage:
- Size: 49.8 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A tiny JavaScript library console log with gradient color.> Beautiful color gradients in terminal output
![a](https://res.cloudinary.com/hunghg255/image/upload/v1693383952/ungradient_c8vo8n.png)
## Install
```
npm i ungradient
```## Usage
```ts
import {
gradient,
atlas,
cristal,
fruit,
instagram,
mind,
morning,
passion,
pastel,
rainbow,
retro,
summer,
teen,
vice,
} from 'ungradient';console.log(atlas('Hello atlas!'));
console.log(cristal('Hello cristal!'));
console.log(fruit('Hello fruit!'));
console.log(instagram('Hello instagram!'));
console.log(mind('Hello mind!'));
console.log(morning('Hello morning!'));
console.log(passion('Hello passion!'));
console.log(pastel('Hello pastel!'));
console.log(rainbow('Hello rainbow!'));
console.log(retro('Hello retro!'));
console.log(summer('Hello summer!'));
console.log(teen('Hello teen!'));
console.log(vice('Hello vice!'));let coolGradient = gradient(
{ r: 0, g: 255, b: 0 }, // RGB object
{ h: 240, s: 1, v: 1, a: 1 }, // HSVa object
'rgb(120, 120, 0)', // RGB CSS string
'gold'
);
console.log(coolGradient('Hello Custom Color!', { interpolation: 'hsv', hsvSpin: 'long' }));let duck = gradient('orange', 'yellow').multiline([
" __",
"<(o )___",
" ( ._> /",
" `---'",
].join('\n'), { interpolation: 'hsv', hsvSpin: 'long'});
console.log(duck);
```