Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

color management - add document color profile and export color profile #246

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions plugin-api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ interface PluginAPI {
saveVersionHistoryAsync(title: string, description?: string): Promise<VersionHistoryResult>
showUI(html: string, options?: ShowUIOptions): void
readonly ui: UIAPI
readonly util: UtilAPI
readonly clientStorage: ClientStorageAPI
readonly parameters: ParametersAPI
getNodeById(id: string): BaseNode | null
Expand Down Expand Up @@ -256,11 +255,6 @@ interface UIAPI {
once(type: 'message', callback: MessageEventHandler): void
off(type: 'message', callback: MessageEventHandler): void
}
interface UtilAPI {
rgb(color: string | RGB | RGBA): RGB
rgba(color: string | RGB | RGBA): RGBA
solidPaint(color: string | RGB | RGBA, overrides?: Partial<SolidPaint>): SolidPaint
}
declare type CodegenEvent = {
node: SceneNode
language: string
Expand Down Expand Up @@ -802,6 +796,7 @@ interface ExportSettingsImage {
readonly useAbsoluteBounds?: boolean
readonly suffix?: string
readonly constraint?: ExportSettingsConstraints
readonly colorProfile?: 'DOCUMENT' | 'SRGB' | 'DISPLAY_P3_V4'
}
interface ExportSettingsSVGBase {
readonly contentsOnly?: boolean
Expand All @@ -810,6 +805,7 @@ interface ExportSettingsSVGBase {
readonly svgOutlineText?: boolean
readonly svgIdAttribute?: boolean
readonly svgSimplifyStroke?: boolean
readonly colorProfile?: 'DOCUMENT' | 'SRGB' | 'DISPLAY_P3_V4'
}
interface ExportSettingsSVG extends ExportSettingsSVGBase {
readonly format: 'SVG'
Expand All @@ -822,6 +818,7 @@ interface ExportSettingsPDF {
readonly contentsOnly?: boolean
readonly useAbsoluteBounds?: boolean
readonly suffix?: string
readonly colorProfile?: 'DOCUMENT' | 'SRGB' | 'DISPLAY_P3_V4'
}
interface ExportSettingsREST {
readonly format: 'JSON_REST_V1'
Expand Down Expand Up @@ -1443,6 +1440,7 @@ interface TextSublayerNode extends MinimalFillsMixin {
interface DocumentNode extends BaseNodeMixin {
readonly type: 'DOCUMENT'
readonly children: ReadonlyArray<PageNode>
readonly documentColorProfile: 'LEGACY' | 'SRGB' | 'DISPLAY_P3'
appendChild(child: PageNode): void
insertChild(index: number, child: PageNode): void
findChildren(callback?: (node: PageNode) => boolean): Array<PageNode>
Expand Down
Loading