#!/bin/sh # rgb_chart_maker a script to generate color charts in HTML format # Copyright 2002 George Cardin # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. echo Generating RGB color chart, this may take a while. red=0 ; green=0 ; blue=0 ; echo > rgb_chart.html # set variables to 0 and clear output file echo " " >> rgb_chart.html echo "
| "$redvalue"0"$greenvalue"0"$bluevalue"0 | " >> rgb_chart.html echo "|||
| "$redvalue"0"$greenvalue"0"$bluevalue"0 | " >> rgb_chart.html else echo ""$redvalue"0"$greenvalue"0"$bluevalue"0 | " >> rgb_chart.html fi blue=`expr $blue + 1` fi elif [ $green -lt 15 ] then if [ $blue -eq 15 ] then redvalue=$red ; greenvalue=$green ; bluevalue=f ; totaltint=`expr $red + $green + $blue` red_hex green_hex if [ $totaltint -lt 22 ] then echo ""$redvalue"0"$greenvalue"0"$bluevalue"0 | " >> rgb_chart.html else echo ""$redvalue"0"$greenvalue"0"$bluevalue"0 | " >> rgb_chart.html fi echo "
| "$redvalue"0"$greenvalue"0"$bluevalue"0 | " >> rgb_chart.html else echo ""$redvalue"0"$greenvalue"0"$bluevalue"0 | " >> rgb_chart.html fi blue=`expr $blue + 1` fi fi done echo "