Example

This example sets the current default color for magenta, then uses SetColorRGB to modify the magenta color.

Sub ModifyMagenta()

'Declare variables for color coponents

Dim magentaRed As Integer

Dim magentaGreen As Integer

Dim magentaBlue As Integer

With Session

'Restore the default colors

.RestoreDefaults rcColors

 

'set the defaults color values for magenta

magentaRed = 255

magentaGreen = 0

magentaBlue = 255

 

'Set plain text to black text on a magenta background

'And pause to view the results

.BackgndColor = rcMagenta

MsgBox "Default Magenta"

 

'Change the color components for magenta, decreasing the

'red value by 20 and using default green and blue values

.SetColorRGB rcMagenta, magentaRed - 20, magentaGreen, magentaBlue

 

MsgBox "Edited Magenta"

End With

End Sub