- From: Matthew Simo via GitHub <sysbot+gh@w3.org>
- Date: Thu, 22 Jun 2023 15:11:08 +0000
- To: public-design-tokens-log@w3.org
Ideally, I'd think the spec should define a comprehensive list of useful types, including oklab & oklch. However, with the extensible types idea I'm proposing it could look something like this: ``` { "$schemas": { "oklch-color": { "$properties": { "l": { "$name": "lightness", "$types": ["percentage", "number"], }, "c": { "$name": "chroma", "$types": ["percentage", "number"], }, "h": { "$name": "hue", "$types": ["number", "angle"], } }, }, }, "Majestic magenta": { "$value": { l: "70.17%", c: 0.322, h: 328.36, }, "$type": "$schemas.oklch-color" }, } ``` Note: This is inspired by the openapi spec and I'm not necessarily promoting this format or structure - it's just for illustrative purposes. Also, it assumes some generic types that the spec provides like "percentage", "number", "angle", which I'm taking from https://www.w3.org/TR/css-values-4/#numeric-types -- GitHub Notification of comment by matthewsimo Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/221#issuecomment-1602815085 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 22 June 2023 15:11:10 UTC