{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/csswg-drafts/issues/2813","repository_url":"https://api.github.com/repos/w3c/csswg-drafts","labels_url":"https://api.github.com/repos/w3c/csswg-drafts/issues/2813/labels{/name}","comments_url":"https://api.github.com/repos/w3c/csswg-drafts/issues/2813/comments","events_url":"https://api.github.com/repos/w3c/csswg-drafts/issues/2813/events","html_url":"https://github.com/w3c/csswg-drafts/issues/2813","id":335570584,"node_id":"MDU6SXNzdWUzMzU1NzA1ODQ=","number":2813,"title":"Convert RGB to the closest representation with name","user":{"login":"dilyanpalauzov","id":4992947,"node_id":"MDQ6VXNlcjQ5OTI5NDc=","avatar_url":"https://avatars0.githubusercontent.com/u/4992947?v=4","gravatar_id":"","url":"https://api.github.com/users/dilyanpalauzov","html_url":"https://github.com/dilyanpalauzov","followers_url":"https://api.github.com/users/dilyanpalauzov/followers","following_url":"https://api.github.com/users/dilyanpalauzov/following{/other_user}","gists_url":"https://api.github.com/users/dilyanpalauzov/gists{/gist_id}","starred_url":"https://api.github.com/users/dilyanpalauzov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dilyanpalauzov/subscriptions","organizations_url":"https://api.github.com/users/dilyanpalauzov/orgs","repos_url":"https://api.github.com/users/dilyanpalauzov/repos","events_url":"https://api.github.com/users/dilyanpalauzov/events{/privacy}","received_events_url":"https://api.github.com/users/dilyanpalauzov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-25T21:15:21Z","updated_at":"2018-06-29T10:35:28Z","closed_at":null,"author_association":"NONE","body":"[RFC 7986 New Properties for iCalendar](https://tools.ietf.org/html/rfc7986#section-5.9) introduces a COLOR property and according to my reading the value can only be a color name, hence no RGB.\r\n\r\nA possible UI would be, rathat than offering a mega big box of distinct possible colorus, to let the user choose any RGB colour and then convert the choice to the nearest colour that has text representation.\r\n\r\nThe question is how to calculate the nearest RGB with a text representation to a given RGB.\r\n\r\nAt first I thought that the colours listed at https://drafts.csswg.org/css-color/#named-colors have equal distance, so it is just a matter of converting each color component to the closest value that can be divided by  e.g. 8.  But the list contains only two values starting with \\#3:\r\n\r\nlimegreen #32CD32 | 50 205 50\r\nmediumseagreen | #3CB371 | 60 179 113\r\n\r\nbut with \\#2 more colours start:\r\ndarkslategray | #2F4F4F | 47 79 79\r\nforestgreen | #228B22 | 34 139 34\r\nlightseagreen | #20B2AA | 32 178 170\r\nseagreen | #2E8B57 | 46 139 87\r\n\r\nSo the jumps in the colours are not normed.\r\n\r\nIsn't it better to adjust the text representations for have equal distances between each other?  E.g. each R-G-B component can have distinct values: 0, 4, 8, C or alike?\r\n\r\nWhat would be the current procedure to convert arbitraty RGB to the closest colour representable as text?"},"comment":{"url":"https://api.github.com/repos/w3c/csswg-drafts/issues/comments/401317196","html_url":"https://github.com/w3c/csswg-drafts/issues/2813#issuecomment-401317196","issue_url":"https://api.github.com/repos/w3c/csswg-drafts/issues/2813","id":401317196,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTMxNzE5Ng==","user":{"login":"dilyanpalauzov","id":4992947,"node_id":"MDQ6VXNlcjQ5OTI5NDc=","avatar_url":"https://avatars0.githubusercontent.com/u/4992947?v=4","gravatar_id":"","url":"https://api.github.com/users/dilyanpalauzov","html_url":"https://github.com/dilyanpalauzov","followers_url":"https://api.github.com/users/dilyanpalauzov/followers","following_url":"https://api.github.com/users/dilyanpalauzov/following{/other_user}","gists_url":"https://api.github.com/users/dilyanpalauzov/gists{/gist_id}","starred_url":"https://api.github.com/users/dilyanpalauzov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dilyanpalauzov/subscriptions","organizations_url":"https://api.github.com/users/dilyanpalauzov/orgs","repos_url":"https://api.github.com/users/dilyanpalauzov/repos","events_url":"https://api.github.com/users/dilyanpalauzov/events{/privacy}","received_events_url":"https://api.github.com/users/dilyanpalauzov/received_events","type":"User","site_admin":false},"created_at":"2018-06-29T10:35:28Z","updated_at":"2018-06-29T10:35:28Z","author_association":"NONE","body":"The RFC is finalized, but I am going to propose errata to it:\r\n\r\nhttps://www.ietf.org/mail-archive/web/calsify/current/msg03048.html"}}
{"actor":{"display_login":"dilyanpalauzov"}}