UNPKG

intentful

Version:

Create Custom Skills with less headache

28 lines (27 loc) 623 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Color = void 0; class Color { constructor(value) { this.value = value; } toJSON() { return this.model(); } model() { return this.value; } static expression(value) { return new Color(value); } static literal(value) { return Color.expression(value); } static hex(r, g, b, a) { return new Color(`#${r}${g}${b}${a ? a : ''}`); } static rgba(r, g, b, a) { return new Color(`rgba(${r},${g},${b},${a}%)`); } } exports.Color = Color;