bonjour,
Voilà comment restreindre le choix de couleur de la police ?
Au lieu d'avoir un arc en ciel.
Merci
Modérateur: Equipe







function colorPalette(dir, width, height)
{
var r = 0, g = 0, b = 0;
var numberList = new Array(6);
var color = '';
numberList[0] = '00';
numberList[1] = '40';
numberList[2] = '80';
numberList[3] = 'BF';
numberList[4] = 'FF';



function colorPalette(dir, width, height)
{
var r = 0, g = 0, b = 0;
var numberList = new Array(7);
var color = '';
numberList[0] = '000000';
numberList[1] = '00AA00';
numberList[2] = 'DA9A3E';
numberList[3] = '8B1500';
numberList[4] = '8A3ABE';
numberList[5] = '3D53C9';
numberList[6] = '8B1500';
document.writeln('<table cellspacing="1" cellpadding="0" border="0">');
for (r = 0; r < 7; r++)
{
for (g = 0; g < 1; g++)
{
if (dir == 'v')
{
document.writeln('<tr>');
}
for (b = 0; b < 1; b++)
{
color = String(numberList[r]);
document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">');
document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
document.writeln('</td>');
}
if (dir == 'v')
{
document.writeln('</tr>');
}
}
}
document.writeln('</table>');
}





function colorPalette(dir, width, height)
{
var rgb = 0;
var numberList = new Array(7);
var color = '';
numberList[0] = '000000';
numberList[1] = '00AA00';
numberList[2] = 'DA9A3E';
numberList[3] = '8B1500';
numberList[4] = '8A3ABE';
numberList[5] = '3D53C9';
numberList[6] = 'FF0000';
document.writeln('<table cellspacing="1" cellpadding="0" border="0">');
for (rgb = 0; rgb < 7; rgb++)
{
if (dir == 'v')
{
document.writeln('<tr>');
}
color = String(numberList[rgb]);
document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">');
document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
document.writeln('</td>');
if (dir == 'v')
{
document.writeln('</tr>');
}
}
document.writeln('</table>');
}


Utilisateurs parcourant ce forum: Google [Bot] et 12 invités