Provides xterm/term parser and formatter to Color class.
With node previously installed:
npm install @zokugun/lang.color.xterm
Use it with JavaScript
:
require('kaoscript/register');
const { Color, Space } = require('@zokugun/lang.color.xterm')();
const c = new Color('x50');
Use it with kaoscript
:
import '@zokugun/lang.color.xterm'
const c = new Color('x50')
import '@zokugun/lang.color.xterm'
const c = new Color('#abc')
expect(c.term()).to.equal(7)
expect(c.xterm()).to.equal(146)
expect(c.format('term')).to.equal('x007')
expect(c.format('xterm')).to.equal('x146')
MIT © Baptiste Augrain