colors table fixes

This commit is contained in:
codecalm
2019-12-09 18:17:44 +01:00
parent 9846504339
commit 5995fe2a94
3 changed files with 32 additions and 46 deletions
+5
View File
@@ -84,6 +84,11 @@ module Jekyll
input.gsub re, repl_str
end
def hex_to_rgb(color)
r, g, b = color.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/).captures
"rgb(#{r.hex}, #{g.hex}, #{b.hex})"
end
end
end