{"action":"created","issue":{"url":"https://api.github.com/repos/Shoes3/shoes3/issues/243","repository_url":"https://api.github.com/repos/Shoes3/shoes3","labels_url":"https://api.github.com/repos/Shoes3/shoes3/issues/243/labels{/name}","comments_url":"https://api.github.com/repos/Shoes3/shoes3/issues/243/comments","events_url":"https://api.github.com/repos/Shoes3/shoes3/issues/243/events","html_url":"https://github.com/Shoes3/shoes3/issues/243","id":148950230,"number":243,"title":"equality operator on color is missing","user":{"login":"passenger94","id":10730930,"avatar_url":"https://avatars.githubusercontent.com/u/10730930?v=3","gravatar_id":"","url":"https://api.github.com/users/passenger94","html_url":"https://github.com/passenger94","followers_url":"https://api.github.com/users/passenger94/followers","following_url":"https://api.github.com/users/passenger94/following{/other_user}","gists_url":"https://api.github.com/users/passenger94/gists{/gist_id}","starred_url":"https://api.github.com/users/passenger94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/passenger94/subscriptions","organizations_url":"https://api.github.com/users/passenger94/orgs","repos_url":"https://api.github.com/users/passenger94/repos","events_url":"https://api.github.com/users/passenger94/events{/privacy}","received_events_url":"https://api.github.com/users/passenger94/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-17T13:15:08Z","updated_at":"2016-04-17T21:42:17Z","closed_at":null,"body":"While working on tests for Shoes::Color i  noticed \r\n`rgb(255,0,0) == rgb(0,0,255)` \r\nThis assertion is true, at the moment, because == is implemented via the spaceship operator which compares two colors by adding each component of a color and compares the result for equality, which leads to the absurd assertion above\r\n\r\nI have a fix which implements **==** and **eql?** besides the spaceship operator (with passing Tests).\r\n\r\nBut before submitting a PR, i would like to know, what you think about the spaceship operator behavior ? Is this desirable ? : `assert_equal(0, rgb(255,0,0) <=> rgb(0,0,255))`\r\n\r\n\r\nEDIT :  related\r\n**invert** method on color has no respect for the alpha channel (fix awaiting in PR)\r\ngiven :  color = rgb(157,255,25,57)\r\n`assert_equal rgb(98,0,230,57), color.invert` was failing  - color invert was rgb(98,0,230,255) - "},"comment":{"url":"https://api.github.com/repos/Shoes3/shoes3/issues/comments/211120606","html_url":"https://github.com/Shoes3/shoes3/issues/243#issuecomment-211120606","issue_url":"https://api.github.com/repos/Shoes3/shoes3/issues/243","id":211120606,"user":{"login":"ccoupe","id":222691,"avatar_url":"https://avatars.githubusercontent.com/u/222691?v=3","gravatar_id":"","url":"https://api.github.com/users/ccoupe","html_url":"https://github.com/ccoupe","followers_url":"https://api.github.com/users/ccoupe/followers","following_url":"https://api.github.com/users/ccoupe/following{/other_user}","gists_url":"https://api.github.com/users/ccoupe/gists{/gist_id}","starred_url":"https://api.github.com/users/ccoupe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccoupe/subscriptions","organizations_url":"https://api.github.com/users/ccoupe/orgs","repos_url":"https://api.github.com/users/ccoupe/repos","events_url":"https://api.github.com/users/ccoupe/events{/privacy}","received_events_url":"https://api.github.com/users/ccoupe/received_events","type":"User","site_admin":false},"created_at":"2016-04-17T21:42:17Z","updated_at":"2016-04-17T21:42:17Z","body":"255,0,0 is not equal to 0,0,255 IMO. Which one is larger and which is smaller is ... anyone's guess. Be aware somethings may be rgba and some may be argb."}}