##alias target red

% include Color::RGB::JP::ERBUtil
% include ERB::Util

<html>
<head>
  <title><%=h pallet %>::<%=h lookup("target").name.const_name %></title>
  <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
  <style>
  table {
    width: 100%;
  }
  table, tr, th, td {
    border: 1px solid black;
    border-collapse: collapse;
  }
  th, td {
    padding: 4px;
    width: 20%;
  }
  span {
    font-size: 3px;
    width: 100%; display: block;
  }
  </style>
</head>
<body>

<h1><%=h pallet %>::<%=h lookup("target").name.const_name %></h1>

% filters = [:lighten_by, :darken_by, :adjust_brightness, :adjust_saturation, :adjust_hue]

<table>
  <tr>
% filters.each do |filter|
    <th><%= filter %></th>
% end
  </tr>

  <tr>
% filters.each do |filter|
  <td>
% 100.times do |i|
% v = ##target.__send__(filter, i)
    <span title="<%= filter %>(<%= i %>) = <%=h v %>"
        style="background-color: <%= v %>">
      &nbsp;
    </span>
% end
  </td>
% end
  </tr>
</table>

</body>
</html>
