UNPKG

osbtools

Version:

A set of tools for working with osu! storyboards

34 lines (33 loc) 746 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const checks_1 = require("../../utils/checks"); class SbColorValue { #r; #g; #b; constructor({ r, g, b }) { this.#r = r; this.#g = g; this.#b = b; } get() { return { r: this.#r, g: this.#g, b: this.#b }; } getR() { return this.#r; } getG() { return this.#g; } getB() { return this.#b; } toString() { return [(0, checks_1.getNumberOrNull)(this.#r), (0, checks_1.getNumberOrNull)(this.#g), (0, checks_1.getNumberOrNull)(this.#b)].filter((x) => x !== null).join(","); } } exports.default = SbColorValue;