RGB-functie

Geeft een Longintegere kleur waarde terug, bestaande uit de componenten rood, groen en blauw.

Syntaxis:


RGB (Red, Green, Blue)

Teruggegeven waarde:

Long

Parameter:

red: Any integer expression that represents the red component (0-255) of the composite color.

green: Any integer expression that represents the green component (0-255) of the composite color.

blue: Any integer expression that represents the blue component (0-255) of the composite color.

tip

The color picker dialog helps computing red, green and blue components of a composite color. Changing the color of text and selecting Custom color displays the color picker dialog.


Foutcodes:

5 Ongeldige aanroep van procedure

Voorbeeld:


Sub ExampleColor
Dim lVar As Long
    lVar = rgb(128,0,200)
    MsgBox "De kleur " & lVar & " bevat de componenten:" & Chr(13) &_
        "rood= " & Red(lVar) & Chr(13)&_
        "groen= " & Green(lVar) & Chr(13)&_
        "blauw= " & Blue(lVar) & Chr(13), 64,"Kleuren"
End Sub