Skip to content

Commit

Permalink
color management - add document color profile and export color profile
Browse files Browse the repository at this point in the history
  • Loading branch information
jungwoolee-figma committed Jul 31, 2023
1 parent ee2b0e4 commit 6a77cbd
Showing 1 changed file with 4 additions and 6 deletions.
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

0 comments on commit 6a77cbd

Please sign in to comment.