{"action":"created","issue":{"url":"https://api.github.com/repos/IBM/carbon-elements/issues/201","repository_url":"https://api.github.com/repos/IBM/carbon-elements","labels_url":"https://api.github.com/repos/IBM/carbon-elements/issues/201/labels{/name}","comments_url":"https://api.github.com/repos/IBM/carbon-elements/issues/201/comments","events_url":"https://api.github.com/repos/IBM/carbon-elements/issues/201/events","html_url":"https://github.com/IBM/carbon-elements/issues/201","id":391169974,"node_id":"MDU6SXNzdWUzOTExNjk5NzQ=","number":201,"title":"Refactor colors package and its exports","user":{"login":"joshblack","id":3901764,"node_id":"MDQ6VXNlcjM5MDE3NjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/3901764?v=4","gravatar_id":"","url":"https://api.github.com/users/joshblack","html_url":"https://github.com/joshblack","followers_url":"https://api.github.com/users/joshblack/followers","following_url":"https://api.github.com/users/joshblack/following{/other_user}","gists_url":"https://api.github.com/users/joshblack/gists{/gist_id}","starred_url":"https://api.github.com/users/joshblack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshblack/subscriptions","organizations_url":"https://api.github.com/users/joshblack/orgs","repos_url":"https://api.github.com/users/joshblack/repos","events_url":"https://api.github.com/users/joshblack/events{/privacy}","received_events_url":"https://api.github.com/users/joshblack/received_events","type":"User","site_admin":false},"labels":[{"id":1056381343,"node_id":"MDU6TGFiZWwxMDU2MzgxMzQz","url":"https://api.github.com/repos/IBM/carbon-elements/labels/project:%20elements","name":"project: elements","color":"ff69b4","default":false},{"id":1056157054,"node_id":"MDU6TGFiZWwxMDU2MTU3MDU0","url":"https://api.github.com/repos/IBM/carbon-elements/labels/type:%20dev%20:robot:","name":"type: dev :robot:","color":"c8a2e8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-14T16:05:04Z","updated_at":"2018-12-14T16:48:16Z","closed_at":null,"author_association":"MEMBER","body":"Currently we support the following imports from the color package:\r\n\r\n```js\r\nimport { colors, tokens } from '@carbon/colors';\r\n```\r\n\r\nWhat we should most likely support:\r\n\r\n```ts\r\ntype Color = string;\r\ntype ColorSwatch = {\r\n  10: Color,\r\n  20: Color,\r\n  // ...\r\n  100: Color,\r\n};\r\ntype ColorMap = {\r\n  red: ColorSwatch,\r\n  blue: ColorSwatch,\r\n  // ...\r\n};\r\n\r\nimport {\r\n  // Color Map\r\n  colors,\r\n  \r\n  // Object with keys as token names and their values\r\n  tokens,\r\n  // string\r\n  brand01,\r\n\r\n  // ColorSwatch\r\n  red,\r\n  // string\r\n  red10,\r\n} from '@carbon/colors';\r\n```\r\n\r\nIn addition, we should export a typedef for the color package, maybe in "},"comment":{"url":"https://api.github.com/repos/IBM/carbon-elements/issues/comments/447383150","html_url":"https://github.com/IBM/carbon-elements/issues/201#issuecomment-447383150","issue_url":"https://api.github.com/repos/IBM/carbon-elements/issues/201","id":447383150,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzM4MzE1MA==","user":{"login":"vpicone","id":4078018,"node_id":"MDQ6VXNlcjQwNzgwMTg=","avatar_url":"https://avatars1.githubusercontent.com/u/4078018?v=4","gravatar_id":"","url":"https://api.github.com/users/vpicone","html_url":"https://github.com/vpicone","followers_url":"https://api.github.com/users/vpicone/followers","following_url":"https://api.github.com/users/vpicone/following{/other_user}","gists_url":"https://api.github.com/users/vpicone/gists{/gist_id}","starred_url":"https://api.github.com/users/vpicone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpicone/subscriptions","organizations_url":"https://api.github.com/users/vpicone/orgs","repos_url":"https://api.github.com/users/vpicone/repos","events_url":"https://api.github.com/users/vpicone/events{/privacy}","received_events_url":"https://api.github.com/users/vpicone/received_events","type":"User","site_admin":false},"created_at":"2018-12-14T16:48:16Z","updated_at":"2018-12-14T16:48:16Z","author_association":"NONE","body":"Is there a reason to export the individual tokens, colorswatches and `red10` off of the default as well as nested? I'm probably missing something but there could be an oppurtunity to do just do something like this:\r\n\r\n```\r\nimport {\r\n  colors,\r\n    colors/red, // ColorSwatch\r\n      colors/red[10], // Color\r\n    colors/red10, // Color\r\n  tokens, // group\r\n    tokens/brand01 //Color\r\n}\r\n```\r\n\r\nAlso is supporting the `red10` syntax an imperitive? I think having two separate storys for accessing the colors in a pallete could introduce some convention confusion to projects using this package."}}
{"actor":{"display_login":"vpicone"}}