@atlaskit/tokens
Version:
Design tokens are the single source of truth to name and store design decisions.
12 lines (11 loc) • 350 B
JavaScript
import { argbFromRgb } from './argb-from-rgb';
import { delinearized } from './delinearized';
/**
* Converts a color from linear RGB components to ARGB format.
*/
export function argbFromLinrgb(linrgb) {
const r = delinearized(linrgb[0]);
const g = delinearized(linrgb[1]);
const b = delinearized(linrgb[2]);
return argbFromRgb(r, g, b);
}