Hallo,
bei den zur verfügung stehenden 56 Farben, müssen natürlich im Farbverlauf
irgenwelche Kompromisse gemacht werden.
Option Explicit
Sub rot()
Dim f As Byte, r As Byte, g As Byte, b As Byte
For f = 1 To 56
If f < 28 Then
r = (f + 22) * 5
g = 0
b = g
Else
r = 255
g = Int(f * 1.5)
b = g
End If
ThisWorkbook.Colors(f) = RGB(r, g, b)
Cells(f, 1).Interior.ColorIndex = f
Next
End Sub
Sub gruen()
Dim f As Byte, r As Byte, g As Byte, b As Byte
For f = 1 To 56
If f < 28 Then
r = 0
g = (f + 22) * 5
b = r
Else
r = Int(f * 1.5)
g = 255
b = r
End If
ThisWorkbook.Colors(f) = RGB(r, g, b)
Cells(f, 1).Interior.ColorIndex = f
Next
End Sub
Sub blau()
Dim f As Byte, r As Byte, g As Byte, b As Byte
For f = 1 To 56
If f < 28 Then
r = 0
g = r
b = (f + 22) * 5
Else
r = Int(f * 1.5)
g = r
b = 255
End If
ThisWorkbook.Colors(f) = RGB(r, g, b)
Cells(f, 1).Interior.ColorIndex = f
Next
End Sub
Gruß K.Rola