Previous Document Next Document

Object Model Reference : Classes : C : Color : Properties : Color.RGBBlue


Color.RGBBlue

Property RGBBlue As Long

Description

Member of Color

The RGBBlue property returns or specifies the blue color value for the RGB color model in CorelDRAW. A color is an effect applied to an object that alters the object’s appearance by the way it reflects light. A color model is a system that defines the number and type of colors that make up an image and that is used to organize and define colors according to a set of basic properties that can be reproduced. Black-and-white, grayscale, RGB, CMYK, and paletted are examples of popular color modes.

RGB is a color mode that contains three components: red (R), green (G), and blue (B). The RGB color mode is based on the RGB color model. In the RGB color mode, a value between 0 and 255 is assigned to each channel of red, green, and blue. An RGB color with the component values 0:25:118, for example, contains no red, some green, and more blue, resulting in a slightly greenish blue color. Monitors, scanners, and the human eye use RGB to produce or detect color.

VBA example

The following VBA example deletes all of the shape objects with a RGB red fill.

Sub Test()
 Dim s As Shape
 For Each s In ActivePage.Shapes
  If s.Fill.Type = cdrUniformFill Then
   With s.Fill.UniformColor
    If .Type = cdrColorRGB Then
     If .RGBRed = 255 And .RGBGreen = 0 And .RGBBlue = 0 Then s.Delete
    End If
   End With
  End If
 Next s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.