colors

extract colors from pictures
git clone git://git.2f30.org/colors
Log | Files | Refs | README | LICENSE

hex2html (325B)


      1 #!/bin/sh
      2 
      3 cat << EOF
      4 <!DOCTYPE html>
      5 <html>
      6 <head>
      7 <style>
      8 .color-sample {
      9    float: left;
     10    margin: 2px;
     11    width: 64px;
     12    height: 64px;
     13    border-radius: 3px;
     14 }
     15 </style>
     16 </head>
     17 <body>
     18 EOF
     19 
     20 while read line; do
     21 	echo "<div class=\"color-sample\" style=\"background: ${line}\"></div>"
     22 done
     23 
     24 cat << EOF
     25 </body>
     26 </html>
     27 EOF