UNPKG

ade-planning-api

Version:

An unofficial API wrapper for ADE Planning from Adesoft

11 lines (8 loc) 236 B
import { Color } from "../models/utils"; export function parseRGBColor(color: string): Color { if (!color) { return { r: 0, g: 0, b: 0 }; } const [r, g, b] = color.split(',').map(Number); return { r, g, b }; }