...

View Full Version : color style previewer (tool)



stunix
08-17-2003, 02:37 AM
I really liked that colour styler, mind if i play with it? here is one i did earlier:

note the entry and output of html buttons, it only works on ie and im not sure abot mac, but it works on wine ie.
(lets face it stu, its buggy and might not work at all!!)

anyway, have a look, see if it helps!
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

its attached to this message somewhere in a zip file

MotherNatrsSon
08-17-2003, 04:00 AM
It did not work in IE 5.1.7 on my Mac. It throws an error .. function expected.....in the very last part of the page. line 245 I believe it was.

MNS

stunix
08-19-2003, 10:06 AM
im sorry, i guessed it wouldnt work on a mac, i have found out the hard way that IE for the mac is possibly the most fickle of all the browsers, i assure you it works on a pc.

on the same subject, i wrote this to be used in conjunction with automating the build of style sheets by a non coding user,

a simple selection box with all of the named colours and the majority of hex. handy for quick reference.



<xmp>
function doclr(){
boc = new Array ('AliceBlue','AntiqueWhite','Aqua','Aquamarine','Azure','Beige',
'Bisque','Black','BlanchedAlmond','Blue','BlueViolet','Brown','BurlyWood',
'CadetBlue','Chartreuse','Chocolate','Coral','CornflowerBlue','Cornsilk',
'Crimson','Cyan','DarkBlue','DarkCyan','DarkGoldenRod','DarkGray','DarkGreen',
'DarkKhaki','DarkMagenta','DarkOliveGreen','Darkorange','DarkOrchid','DarkRed',
'DarkSalmon','DarkSeaGreen','DarkSlateBlue','DarkSlateGray','DarkTurquoise',
'DarkViolet','DeepPink','DeepSkyBlue','DimGray','DodgerBlue','FireBrick',
'FloralWhite','ForestGreen','Fuchsia','Gainsboro','GhostWhite','Gold',
'GoldenRod','Gray','Green','GreenYellow','HoneyDew','HotPink','IndianRed',
'Indigo','Ivory','Khaki','Lavender','LavenderBlush','LawnGreen','LemonChiffon',
'LightBlue','LightCoral','LightCyan','LightGoldenRodYellow','LightGrey',
'LightGreen','LightPink','LightSalmon','LightSeaGreen','LightSkyBlue',
'LightSlateGray','LightSteelBlue','LightYellow','Lime','LimeGreen','Linen',
'Magenta','Maroon','MediumAquaMarine','MediumBlue','MediumOrchid',
'MediumPurple','MediumSeaGreen','MediumSlateBlue','MediumSpringGreen',
'MediumTurquoise','MediumVioletRed','MidnightBlue','MintCream','MistyRose',
'Moccasin','NavajoWhite','Navy','OldLace','Olive','OliveDrab','Orange',
'OrangeRed','Orchid','PaleGoldenRod','PaleGreen','PaleTurquoise','PaleVioletRed',
'PapayaWhip','PeachPuff','Peru','Pink','Plum','PowderBlue','Purple','Red',
'RosyBrown','RoyalBlue','SaddleBrown','Salmon','SandyBrown','SeaGreen','SeaShell',
'Sienna','Silver','SkyBlue','SlateBlue','SlateGray','Snow','SpringGreen',
'SteelBlue','Tan','Teal','Thistle','Tomato','Turquoise','Violet','Wheat',
'White','WhiteSmoke','Yellow','YellowGreen');
clr=new Array('00','22','44','66','88','aa','cc','ee','ff');out = '<select>';
for(i=0;i<clr.length;i++){for(j=0;j<clr.length;j++){for(k=0;k < clr.length;k++){
out+='<option style="background-color:#'+clr[i]+clr[j]+clr[k]+';color:#'+clr[7-i]
out+=clr[7-j]+clr[7-k]+'">#'+clr[i]+clr[j]+clr[k];}}}for (i=0;i<boc.length;i++)
{out+='<option style="background-color:'+boc[i]+';color:black">'+boc[i]}
out+='</select>';return out}

document.write(doclr())
</xmp>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum