Gibt es eine möglichkeit ein Mischfarbton mit Helligkeit kontrsast zu rechnen aus mehrere Farben wo mann Intensität und Farbstärke berechnnen kann?
Ich habe Folgendes:
Private Sub UserForm_Initialize()
Rem Rot wert von 0 bis 255
Rem Green wert von 0 bis 255
Rem Blau wert von 0 bis 255
UserForm9.Caption = "ECS ver 1.05-01 Farbton: " & ToggleButton1.Caption & " Datum: " & Date & " ** Y - Rez. **"
Dim Rot, Rot0, Rot1, Rot2, Rot3, Rot4, Rot5 As Integer
Dim Green, Green0, Green1, Green2, Green3, Green4, Green5 As Integer
Dim Blau, Blau0, Blau1, Balu2, Blau3, Blau4, Blau5 As Integer
Rem BASIS
10 If Cells(10, 14) = "" Then GoTo 20
Rot0 = Cells(10, 24).Value
Green0 = Cells(10, 25).Value
Blau0 = Cells(10, 26).Value
Label6.BackColor = RGB(Rot0, Green0, Blau0)
20 Rem PIG1
If Cells(11, 14) = "" Then GoTo 30
Rot1 = Cells(11, 24).Value
Green1 = Cells(11, 25).Value
Blau1 = Cells(11, 26).Value
Label7.BackColor = RGB(Rot1, Green1, Blau1)
30 Rem PIG2
If Cells(12, 14) = "" Then GoTo 40
Rot2 = Cells(12, 24).Value
Green2 = Cells(12, 25).Value
Blau2 = Cells(12, 26).Value
Label8.BackColor = RGB(Rot2, Green2, Blau2)
40 Rem PIG3
If Cells(13, 14) = "" Then GoTo 50
Rot3 = Cells(13, 24).Value
Green3 = Cells(13, 25).Value
Blau3 = Cells(13, 26).Value
Label9.BackColor = RGB(Rot3, Green3, Blau3)
50 Rem PIG4
If Cells(14, 14) = "" Then GoTo 60
Rot4 = Cells(14, 24).Value
Green4 = Cells(14, 25).Value
Blau4 = Cells(14, 26).Value
Label10.BackColor = RGB(Rot4, Green4, Blau4)
60 Rem PIG5
If Cells(15, 14) = "" Then GoTo 100
Rot5 = Cells(15, 24).Value
Green5 = Cells(15, 25).Value
Blau5 = Cells(15, 26).Value
Label11.BackColor = RGB(Rot5, Green5, Blau5)
100
Rem i ( 1 bis 6 )
Rem Rot = ( Rot0 + Rot1 +
+Rot (i) )/ i
Rem Green = ( Green0 + Green1 +
+Green (i) )/ i
Rem Blau = ( Blau0 + Blau1 +
+Blau (i) )/ i
Rot = Cells(9, 24).Value
Green = Cells(9, 25).Value
Blau = Cells(9, 26).Value
Rem Ideal Mischung
Label12.ForeColor = RGB(Rot, Green, Blau)
Rem Kontrast
Label12.BackColor = RGB(255 - Rot, 255 - Green, 255 - Blau)
End Sub
Nun Mein Problemm is so kann Mann kein Grau Farbton rechnen!
Hat Jemand eine Idea ?
Gruß
EL