Auteur Sujet: Color Picker BAR BBCODES ~ JavaScript: col[5] = new Array(0, 0,255, 0,255 -1);  (Lu 1093 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne 3000fr

  • Administrator
  • Hero Member
  • *****
  • Messages: 957
  • · Admin ·
    • NEW FORUM 3000fr
Bonjour, pour améliorer le new forum 3000fr:
installation d'une barre de couleur cliquable pour agrémenter les textes des messages

Color & BgColor Clickable BBCode Bar
Télécharger Simple Machines: http://custom.simplemachines.org/mods/index.php?mod=1223



J'ai pas réeussi à faire une jolie liaison color / dégradé entre le vert foncé et le Bleu ...
Voir Screen * entre >   <

Si quelqu'un a une solution pour modifier le code
Je pense qu'il faut insérer une portion entre

col[6] = new Array(0, 0, 255, -1, 0, 0);
col[7] = new Array(0, 1, 0, 1, 0, 1);


Pour lier avec un dégradé de noir / gris ou de bleu / bleu foncé / Noir

col[0] = new Array(255, 0, 255, 0, 255, -1);
col[1] = new Array(255, 0, 255, -1, 0, 0);
col[2] = new Array(255, 0, 0, 0, 0, 1);
col[3] = new Array(255, -1, 0, 0, 255, 0);
col[4] = new Array(0, 0, 0, 1, 255, 0);
col[5] = new Array(0, 0, 255, 0, 255, -1);
col[6] = new Array(0, 0, 255, -1, 0, 0);
col[7] = new Array(0, 1, 0, 1, 0, 1);


Suite ... Juste une partie ....  


function rgb(cpm){
for (j=0;j<9;j++){
for (i=0;i<cpm+1;i++) {
r = Math.floor(col[j][0]+col[j][1]*i*(255)/cpm);
g = Math.floor(col[j][2]+col[j][3]*i*(255)/cpm);
b = Math.floor(col[j][4]+col[j][5]*i*(255)/cpm);
codehex = r + '' + g + '' + b;
   document.write('<td bgColor="' + RGB2Hexa(r,g,b) + '" onClick="color(this.bgColor);'
+ 'document.getElementById(\'colorused\').bgColor = this.bgColor;" onmouseover="alt_text(this);'
+ 'document.getElementById(\'colorused1\').bgColor=this.bgColor;this.style.cursor=\'pointer\'" '
+ 'style="height:18px;width:3px" class="colorcell"><!-- Space --></td>');
}
}
}
Etc ..... C'est just un bout du JS   :g201j:

Merci d'avance - Cordialement  :tchao:  :flamingdevil: :tchao:


:g19:

 

 TANTRA 3000fr KATHANA X¹¹ SERVER 3000fr est ouvert - MMORPG 3D PVP ~ FREE 3000fr

Get our toolbar! Tantra 3000fr