Specifications

Table Of Contents
Adobe Photoshop CS6
JavaScript Scripting Reference JavaScript Object Reference 80
ColorSampler
A color sampler for a document. Access through the Document.colorSamplers collection. For example:
var colorSamplerRef = app.activeDocument.colorSamplers[0];
var currentColor = colorSamplerRef.color;
Note: For additional information about color samplers, see Adobe Photoshop CS6 help on the Color
SamplerTool.
Properties
Methods
Property Value type What it is
color
SolidColor
Read-only. The color of the color sampler.
position
array of
UnitValue
Read-only. The position of the color sampler in the
document. The array (x,y) represents the horizontal and
vertical location of the count item.
parent
Document
Read-only. The containing document.
typename
string
Read-only. The class name of the referenced ColorSampler
object.
Method Parameter type Returns What it does
move
(position)
array of
UnitValue
Moves the color sampler to a new location
in the document.
The
position parameter (x,y) represents
the new horizontal and vertical locations
of the moved color sampler.
remove
()
Deletes the ColorSampler object.