Colori sicuri: 216
I 216 colori che appariranno fedeli su qualsiasi dispositivo scegli il mix di colori fondamentali Red, Green e Blue vedi il risultato e il codice RGB corrispondente RGB Red Green Blue
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
<script> var rgb6= Array("00", "33", "66", "99", "CC", "FF"); function cambia61() { for(var i=0; i < 6; i++) { if(document.colore61.radioR[i].checked) r=rgb6[i]; if(document.colore61.radioG[i].checked) g=rgb6[i]; if(document.colore61.radioB[i].checked) b=rgb6[i]; } document.colore61.coloreR.style.background="#"+r+"0000"; document.colore61.coloreG.style.background="#00"+g+"00"; document.colore61.coloreB.style.background="#0000"+b; colore="#"+r+g+b; document.colore61.colore.style.background=colore; document.colore61.txtColore.value=colore; } function popola(nome) { for(i=0; i < 6; i++) document.writeln("<input type='radio' name=" + nome + " onclick='cambia61()' />" + rgb6[i] + " "); } </script> <form name="colore61"> <table cellspacing="0" cellpadding="3"> <tr> <td><b>RGB</b></td> <td><input type="text" value=" " name="colore" size="30" readonly /></td> <td><input type="text" value="#000000" name="txtColore" size="10" readonly /></td> </tr> <tr> <td>Red</td> <td><input type="text" value=" " name="coloreR" size="30" readonly /></td> <td><script>popola("radioR");</script></td> </tr> <tr> <td>Green</td> <td><input type="text" value=" " name="coloreG" size="30" readonly /></td> <td><script>popola("radioG");</script></td> </tr> <tr> <td>Blue</td> <td><input type="text" value=" " name="coloreB" size="30" readonly /></td> <td><script>popola("radioB");</script></td> </tr> </table> </form> <script> document.colore61.radioR[5].checked=true; document.colore61.radioG[5].checked=true; document.colore61.radioB[5].checked=true; cambia61(); </script> |