- From: Kevin Muldoon via GitHub <sysbot+gh@w3.org>
- Date: Mon, 31 Mar 2025 18:29:45 +0000
- To: public-design-tokens-log@w3.org
Interesting to see a use case where DTCG output from Figma/Sketch would be used 'raw' inside native apps rather than first transformed from generic JSON to platform-specific code. From that POV, a desire to pre-parse colors into JSON key/values and attach a profile/space seems reasonable. However... 1. Parsing/transforming CSS Color() is as easy as parsing a hex string. RegExp is only one tool to make that happen, among other methods of cleaning/parsing. 2. Transforms should be performed by transform tools, not Obj-C, Swift, Kotlin, Java, Python, at the application layer. Good practice to not re-write business logic differently across different stacks. 3. It is systemically impossible to quality control transforms when distributed to multiple systems, often hidden from experts and stake holders. 4. Not all languages have powerful color libraries available and often coded differently. Which can lead to different/undesirable results. 5. Certainly, DTCG is a format, however this proposal is different as **DTCG has never invented a new format for a value**. Instead, pre-existing and well-known formats and units lived in **$value** key such as `{$type: color, $value: #555555}`. I point out that `{$type: color, $value: lab(36%, 0, 0)}`, `{$type: color, $value: rgb(85, 85, 85)}`, {$type: color, $value: oklch(0.45 0 0)}, is an existing format and every bit as parsible as the hex we use every day. Nothing platform specific about it, though it is limited to the horrible sRGB color space which is why we want improve it with this effort. If using the existing standard notation of CSS Color() becomes a possibility, I'd be thrilled to help. Given there have been years of conversations it seems this ship has sailed so I won't muddy the waters any further. -- GitHub Notification of comment by caoimghgin Please view or discuss this issue at https://github.com/design-tokens/community-group/pull/266#issuecomment-2767067690 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 31 March 2025 18:29:46 UTC