class Jekyll::ColorPickerTag

Convert a color into a cute little box

Public Instance Methods

render(_context) click to toggle source

This function renders the color box Params:

context

The context of the page

Example:

{% color_picker #ff0000 %}
# File _plugins/jekyll-color-picker.rb, line 18
def render(_context)
  "<span style='background-color:#{@text};border-radius:3px;border:1px solid #000;width:12px;" \
    "height:12px;margin-right:5px;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"
end