Pour compléter ce post sur les couleurs, voici un tableau de valeurs RGB et leur couleur respective (accompagné du code et du fichier pour les curieux ) :
Tableau Excel :
Tableau Web :
Cette même liste de couleurs est accessible ici : https://www.excel-pratique.com/fr/vba/liste-couleurs-rgb.php
Fichier :
Code :
Sub apercus_rgb() 'Sébastien - Forum Excel-Pratique
ligne = 0
For r = 0 To 256 Step 32
For g = 0 To 256 Step 32
ligne = ligne + 1
For b = 0 To 256 Step 32
col = b / 32 + 1
If r = 256 Then r = 255
If g = 256 Then g = 255
If b = 256 Then b = 255
Cells(ligne, col) = r & ", " & g & ", " & b
Cells(ligne, col).Interior.Color = RGB(r, g, b)
If (r + g + b) / 32 < 7 Then Cells(ligne, col).Font.ColorIndex = 15
Next
Next
Next
End Sub
Explications sur l'utilisation des couleurs RGB en VBA :
https://www.excel-pratique.com/fr/vba/couleurs.php