app/helpers/smurfville/styleguide_helper.rb in smurfville-0.0.5 vs app/helpers/smurfville/styleguide_helper.rb in smurfville-0.0.6

- old
+ new

@@ -4,11 +4,12 @@ module StyleguideHelper # returns well readable, high-contrast foreground color ("black" or "white") based on passed background_color def foreground_color(background_color) if color = Smurfville::ColorVariableParser.parse_color(background_color) - return "black" if color.brightness > 0.5 + color.brightness > 0.5 ? "black" : "white" + else + "black" end - return "white" end end end