{"action":"closed","issue":{"url":"https://api.github.com/repos/less/less.js/issues/2743","repository_url":"https://api.github.com/repos/less/less.js","labels_url":"https://api.github.com/repos/less/less.js/issues/2743/labels{/name}","comments_url":"https://api.github.com/repos/less/less.js/issues/2743/comments","events_url":"https://api.github.com/repos/less/less.js/issues/2743/events","html_url":"https://github.com/less/less.js/issues/2743","id":119931272,"number":2743,"title":"contrast() producing incorrect results","user":{"login":"Nettsentrisk","id":1027492,"avatar_url":"https://avatars.githubusercontent.com/u/1027492?v=3","gravatar_id":"","url":"https://api.github.com/users/Nettsentrisk","html_url":"https://github.com/Nettsentrisk","followers_url":"https://api.github.com/users/Nettsentrisk/followers","following_url":"https://api.github.com/users/Nettsentrisk/following{/other_user}","gists_url":"https://api.github.com/users/Nettsentrisk/gists{/gist_id}","starred_url":"https://api.github.com/users/Nettsentrisk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nettsentrisk/subscriptions","organizations_url":"https://api.github.com/users/Nettsentrisk/orgs","repos_url":"https://api.github.com/users/Nettsentrisk/repos","events_url":"https://api.github.com/users/Nettsentrisk/events{/privacy}","received_events_url":"https://api.github.com/users/Nettsentrisk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2015-12-02T12:28:18Z","updated_at":"2016-03-15T16:52:42Z","closed_at":"2016-03-15T16:52:42Z","body":"The contrast function is supposed to \"Choose which of two colors provides the greatest contrast with another.\"\r\n\r\nExamples here show that it's not producing the correct results: http://codepen.io/anon/pen/eJORae\r\n\r\nThe light and dark colors default to white and black respectively.\r\n\r\ncontrast(#F1560C) gives #FFF, which is a contrast ratio of 3.46, yet #000 has a contrast ratio of 6.08. Why is it picking #FFF when #000 gives a greater contrast?\r\n\r\ncontrast(#F08202) produces the same incorrect result.\r\n\r\nThe function is supposed to help \"ensuring that a color is readable against a background, which is also useful for accessibility compliance\".\r\n\r\nChoosing a color that has a 3.46 contrast ratio, below the WCAG AA requirement of 4.5, instead of a color that gives a contrast ratio of 6.08, is not a correct result."}}