{"action":"created","issue":{"url":"https://api.github.com/repos/sass/libsass/issues/2015","repository_url":"https://api.github.com/repos/sass/libsass","labels_url":"https://api.github.com/repos/sass/libsass/issues/2015/labels{/name}","comments_url":"https://api.github.com/repos/sass/libsass/issues/2015/comments","events_url":"https://api.github.com/repos/sass/libsass/issues/2015/events","html_url":"https://github.com/sass/libsass/issues/2015","id":150011814,"number":2015,"title":"Compiler error: argument `$color` of `lightness($color)` must be a color","user":{"login":"emyarod","id":8265238,"avatar_url":"https://avatars.githubusercontent.com/u/8265238?v=3","gravatar_id":"","url":"https://api.github.com/users/emyarod","html_url":"https://github.com/emyarod","followers_url":"https://api.github.com/users/emyarod/followers","following_url":"https://api.github.com/users/emyarod/following{/other_user}","gists_url":"https://api.github.com/users/emyarod/gists{/gist_id}","starred_url":"https://api.github.com/users/emyarod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emyarod/subscriptions","organizations_url":"https://api.github.com/users/emyarod/orgs","repos_url":"https://api.github.com/users/emyarod/repos","events_url":"https://api.github.com/users/emyarod/events{/privacy}","received_events_url":"https://api.github.com/users/emyarod/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-04-21T08:58:18Z","updated_at":"2016-04-22T03:39:29Z","closed_at":"2016-04-22T01:02:27Z","body":"It seems that [libsass 3.3.3](https://github.com/sass/libsass/releases/3.3.3) or higher throws an error when passing a color into this a function I've written:\r\n\r\nError:\r\n```\r\nargument `$color` of `lightness($color)` must be a color\r\nBacktrace:\r\n    sass/utils/_functions.scss:6, in function `lightness`\r\n    sass/utils/_functions.scss:6, in function `set-text-color`\r\n    sass/components/_buttons.scss:214\r\n```\r\n\r\nthe function in question:\r\n```\r\n// dynamic text color\r\n@function set-text-color($bg-color) {\r\n  // if background color is light, return dark colored text\r\n  @if (lightness($bg-color) > 50) { @return $dark-text; }\r\n  // if background color is dark, return light colored text\r\n  } @else { @return $light-text;  }\r\n}\r\n```\r\n\r\nHowever, when I compile my Sass source files in [node-sass 3.4.2](https://github.com/sass/node-sass) (which uses [libsass 3.3.2](https://github.com/sass/libsass/releases/tag/3.3.2)), or if I compile using [sass.js 0.9.4](https://github.com/medialize/sass.js/releases/tag/0.9.4) (which uses [libsass 3.3.1](https://github.com/sass/libsass/releases/tag/3.3.1)), everything compiles fine."},"comment":{"url":"https://api.github.com/repos/sass/libsass/issues/comments/213231710","html_url":"https://github.com/sass/libsass/issues/2015#issuecomment-213231710","issue_url":"https://api.github.com/repos/sass/libsass/issues/2015","id":213231710,"user":{"login":"emyarod","id":8265238,"avatar_url":"https://avatars.githubusercontent.com/u/8265238?v=3","gravatar_id":"","url":"https://api.github.com/users/emyarod","html_url":"https://github.com/emyarod","followers_url":"https://api.github.com/users/emyarod/followers","following_url":"https://api.github.com/users/emyarod/following{/other_user}","gists_url":"https://api.github.com/users/emyarod/gists{/gist_id}","starred_url":"https://api.github.com/users/emyarod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emyarod/subscriptions","organizations_url":"https://api.github.com/users/emyarod/orgs","repos_url":"https://api.github.com/users/emyarod/repos","events_url":"https://api.github.com/users/emyarod/events{/privacy}","received_events_url":"https://api.github.com/users/emyarod/received_events","type":"User","site_admin":false},"created_at":"2016-04-22T03:39:29Z","updated_at":"2016-04-22T03:39:29Z","body":"When compiling using the official Ruby Sass compiler, this error is thrown:\r\n\r\n```\r\nError: $color: null is not a color for `lightness'\r\n        on line 6 of utils/_functions.scss\r\n        from line 10 of flattish.scss\r\n  Use --trace for backtrace.\r\n```"}}