import { Token } from "../../../types/Token"; import { getColors } from '../properties'; import { StyleColorRule } from "../../../types/style/StyleColorRule"; import { StylePropertyType } from "../../../types/style/StylePropertyType"; export function parseColor( tokens: Token[] ): StyleColorRule | null { const colors = getColors( tokens ); if( colors.length === 0 ) return null; const color = colors[0]; return { type: StylePropertyType.Color, color } }