UNPKG

@gitlab/ui

Version:
10 lines (7 loc) • 527 B
import { GL_COLOR_BRAND_ORANGE_02P, GL_COLOR_BRAND_ORANGE_01P, GL_COLOR_RED_500, GL_COLOR_BRAND_PURPLE_01P } from '../../tokens/build/js/tokens'; const MATRIX_COLORS = [GL_COLOR_BRAND_ORANGE_02P, GL_COLOR_BRAND_ORANGE_01P, GL_COLOR_RED_500, GL_COLOR_BRAND_PURPLE_01P]; const resolveColors = (colors, element) => ({ head: window.getComputedStyle(element).getPropertyValue('--gl-text-color-default').trim(), rain: colors !== null && colors !== void 0 && colors.length ? colors : MATRIX_COLORS }); export { resolveColors };