Types/OpenPackage/get_Palette.ps1

<#
.SYNOPSIS
    Gets an Open Package palette
.DESCRIPTION
    Gets an Open Package's palette.
.NOTES
    A palette is a relationship between a package and a stylesheet.
#>

param()

if (-not $this.RelationshipExists -or 
    -not $this.GetRelationship) {
    return
}

if ($this.RelationshipExists('palette')) {
    return $this.GetRelationship('palette').TargetUri
}