Well since textarea scrollbars inherit the same properties as the body, and were able to change the properties of T-A S-bars on the fly, i wrote a real-time S-bar color tester. It lacks a color picker but it automatically updates colors when a whole value is entered, replaces non-valid chars with "F" EX: "@pAT?Y" gets replaced with "FFAFFF", converts lowercase values to upper (FFF is easier to see than fff), outputs clean one line code that can be pasted into body{} &OR specialized textarea{} classes with ease, selects code area as soon as process is clicked(one less button to click), and best of all it's right here for you to C&P&save as HTML on your desktop (3.86KB) Feel free to use as you wish, i wrote this by hand from scratch so theres no copyright or anything on it. IE 5.5+ Only.
<html>
<head>
<script language="javascript">
function update(part,val) {
if(part == 1) {
TA.style.scrollbarDarkShadowColor = "#" + val;
}if(part == 2) {
TA.style.scrollbarShadowColor = "#" + val;
}if(part == 3) {
TA.style.scrollbar3dLightColor = "#" + val;
}if(part == 4) {
TA.style.scrollbarHighlightColor = "#" + val;
}if(part == 5) {
TA.style.scrollbarFaceColor = "#" + val;
}if(part == 6) {
TA.style.scrollbarTrackColor = "#" + val;
}if(part == 7) {
TA.style.scrollbarArrowColor = "#" + val;
}
}
function check(part,val) {
if(val.value.length == 6) {
val2 = "";
for(i = 0; i < 6; i++) {
x = val.value.charAt(i);
if((x >= "a" && x <= "f") || (x >= "A" && x <= "F") || (x >= 0 && x <=9)) {
val2 += x;
}else{
val2 += "F";
}
}
val.value = val2.toUpperCase();
update(part,val2.toUpperCase());
}
}
function defaultStyle() {
if(confirm("Are you sure you want to Clear ALL fields ?")) {
TA.style.scrollbarDarkShadowColor="";
TA.style.scrollbarShadowColor="";
TA.style.scrollbar3dLightColor="";
TA.style.scrollbarHighlightColor="";
TA.style.scrollbarFaceColor="";
TA.style.scrollbarTrackColor="";
TA.style.scrollbarArrowColor="";
choice = true;
}else{
choice = false;
}
}
function process(F) {
F.out.value = "";
if(F.dshadow.value.length == 6) {
F.out.value += "scrollbar-darkshadow-color: #" + F.dshadow.value + ";";
}
if(F.shadow.value.length == 6) {
F.out.value += "scrollbar-shadow-color: #" + F.shadow.value + ";";
}
if(F.d3light.value.length == 6) {
F.out.value += "scrollbar-3dlight-color: #" + F.d3light.value + ";";
}
if(F.highlight.value.length == 6) {
F.out.value += "scrollbar-highlight-color: #" + F.highlight.value + ";";
}
if(F.face.value.length == 6) {
F.out.value += "scrollbar-face-color: #" + F.face.value + ";";
}
if(F.trackin.value.length == 6) {
F.out.value += "scrollbar-track-color: #" + F.trackin.value + ";";
}
if(F.arrowin.value.length == 6) {
F.out.value += "scrollbar-arrow-color: #" + F.arrowin.value + ";";
}
F.out.select();
}
</script>
<style>
body {font-family: Verdana; font-size: 11px;}
input {font-family: Verdana;}
textarea {font-family: Verdana;}
.testarea {position: absolute; left: 150px; top: 83px; color: #FFFFFF;}
.form {position: absolute; left: 10px; top: 50px;}
</style>
</head>
<body>
<div class="form"><form id="sbform" onSubmit="return false;">
# <input id="dshadow" type="text" size="7" maxlength="6" onKeyDown="check(1,this);" onKeyUp="check(1,this);"> Dark Shadow<BR>
# <input id="shadow" type="text" size="7" maxlength="6" onKeyDown="check(2,this);" onKeyUp="check(2,this);"> Shadow<BR>
# <input id="d3light" type="text" size="7" maxlength="6" onKeyDown="check(3,this);" onKeyUp="check(3,this);"> 3D Light<BR>
# <input id="highlight" type="text" size="7" maxlength="6" onKeyDown="check(4,this);" onKeyUp="check(4,this);"> Highlight<BR>
# <input id="face" type="text" size="7" maxlength="6" onKeyDown="check(5,this);" onKeyUp="check(5,this);"> Face<BR>
# <input id="trackin" type="text" size="7" maxlength="6" onKeyDown="check(6,this);" onKeyUp="check(6,this);"> Track<BR>
# <input id="arrowin" type="text" size="7" maxlength="6" onKeyDown="check(7,this);" onKeyUp="check(7,this);"> Arrow<BR>
<BR><BR><input type="reset" value="Reset" onClick="defaultStyle();return choice;">
<input type="button" value="Process" onClick="process(this.form);"><BR><BR>
<textarea id="out" cols="30" rows="8" onFocus="select();"></textarea>
</form></div>
<textarea id="TA" class="testarea" cols="10" rows="8">There was a farmer had a dog and bingo was his nameo, b, i, n, g, o,
b, i, n, g, o, b, i, n, g, o, and bingo was his nameo.</textarea>
</body>
</html>