{"issue":{"milestone":null,"title":"Hex to RGB[A] Conversion","created_at":"2011-12-29T20:16:37Z","user":{"id":262782,"login":"alixaxel","url":"https://api.github.com/users/alixaxel","avatar_url":"https://secure.gravatar.com/avatar/be9e4cbcfa96b7e4ad4bc28c88cfdb2b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"be9e4cbcfa96b7e4ad4bc28c88cfdb2b"},"updated_at":"2012-01-01T23:56:35Z","labels":[],"state":"closed","id":2682343,"html_url":"https://github.com/Paratron/SimpLESS/issues/19","closed_at":"2012-01-01T23:56:35Z","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"I was implementing the following mixin* for alpha backgrounds with hex fallback:\r\n\r\n```\r\n.rgba(@hex, @alpha: .8)\r\n{\r\n  background: @hex;\r\n  background: @hex + rgba(0, 0, 0, @alpha);\r\n}\r\n\r\nbody {\r\n\t.rgba(#ff0, 0.8);\r\n}\r\n```\r\n\r\nSimpLESS compiles this into:\r\n\r\n```\r\n/* This beautiful CSS-File has been crafted with LESS (lesscss.org) and compiled by simpLESS (wearekiss.com/simpless) */\r\nbody {\r\n  background: #ffff00;\r\n  background: #ffff00;\r\n}\r\n```\r\n\r\nI haven't actually tried this with LESS.js yet but lessPHP (http://leafo.net/lessphp/editor.html) compiles to:\r\n\r\n```\r\nbody {\r\n  background:#ffff00;\r\n  background:rgba(255,255,0,0.8);\r\n}\r\n```\r\n\r\nIs this a SimpLESS issue or a new \"feature\" of the LESS parser?\r\n\r\n*http://stackoverflow.com/questions/4445238/","number":19,"url":"https://api.github.com/repos/Paratron/SimpLESS/issues/19","comments":3,"assignee":null},"comment":{"created_at":"2012-01-01T23:56:35Z","user":{"id":262782,"login":"alixaxel","url":"https://api.github.com/users/alixaxel","avatar_url":"https://secure.gravatar.com/avatar/be9e4cbcfa96b7e4ad4bc28c88cfdb2b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"be9e4cbcfa96b7e4ad4bc28c88cfdb2b"},"updated_at":"2012-01-01T23:56:35Z","id":3326558,"body":"I'm closing this issue since less.js behaves in the exact same way.\r\n\r\nA solution for the above mixin is using the (not documented) ```hsla()``` color function instead:\r\n\r\n```\r\n.rgba(@hex, @alpha: .8)\r\n{\r\n    background-color: @hex;\r\n    background-color: hsla(hue(@hex), saturation(@hex), lightness(@hex), @alpha); // rgba(...)\r\n}\r\n```","url":"https://api.github.com/repos/Paratron/SimpLESS/issues/comments/3326558"},"action":"created"}