Previous Document Next Document

Object Model Reference : Classes : C : Colors : Properties : Colors.Item


Colors.Item

Property Item(Index As Long) As Color

Description

Member of Colors

The Item property returns the specified color from the color palette. For example, Colors(2) refers to the second color in a palette.

Item is the default property of the Colors class, and its reference can be omitted when you are accessing items in a Colors collection. For example, Colors.Item(2) is the same as Colors(2) — they both reference the second color in the palette.

The Item property returns a read-only value.

Parameter
Description
Index
Specifies the color by its index number

VBA example

The following VBA example creates an ellipse and fills it with 15th color of the current color palette.

Sub Test()
 Dim s As Shape
 Set s = ActiveLayer.CreateEllipse2(2, 2, 1)
 s.Fill.ApplyUniformFill ActivePalette.Colors(15)
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.