import type { Token } from 'style-dictionary' import type { Config, PlatformConfig } from 'style-dictionary/types' import Color from 'colorjs.io' export function filter(token: Token, options: Config): boolean { const tokenType = options.usesDtcg ? token.$type : token.type return tokenType === 'color' } export function transform( token: Token, _config: PlatformConfig, options: Config, ): string { const tokenValue = (options.usesDtcg ? token.$value : token.value) as string const tokenColorValue = new Color(tokenValue) return tokenColorValue.to('oklch').toString() }