- From: Joe Strouth via GitHub <sysbot+gh@w3.org>
 - Date: Thu, 30 Jan 2020 16:23:36 +0000
 - To: public-design-tokens-log@w3.org
 
> I do agree that functions would be nice but I don't see how tools would be able to work with them if we don't specify what they are. Like what is `saturate(tokenA, 10%)` if you don't know what is `saturate`?
The format could specify a means of referencing functions without defining actually defining them. It would be up to the tool to define `saturate` or notify the user that they're referencing an unknown function.
```json
  {
    "name": "color-blue-400",
    "value": {
      "func": "lighten",
      "args": ["color-blue-300", "10%"]
    }
  }
```
If the spec defines what `lighten` means, it is opinionated about what color model to use. "Lightening" by 10% in HSL, HSV, or CIELAB would result in different tokens. One can imagine a similar issue for `saturate` in HSL/HSV. Once the format has been in the wild for some time there may arise a set of common functions, implemented across tools, that could be standardized at a later date.
-- 
GitHub Notification of comment by joestrouth1
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/1#issuecomment-580334396 using your GitHub account
Received on Thursday, 30 January 2020 16:23:38 UTC