08.08.14, 15:24
As in the brightness of a color, but of a vector texture (the ones you load and apply to shapes from a swatch in your palette)?
Is there a way of doing that?
If you mean the average color of a pattern swatch, sure.
You can copy a swatch's definition to a document with:
document.swatches["SwatchName"].color.pattern.defninition.copyTo(document);
This should return a group whose last child is the clipping path. From there you can rasterize a clone of the group and get the average color within the clipping path.