API reference
Asset: Test
Design
addAudioTrackaddElementAtCursoraddElementAtPointaddNativeElementaddPagebulkCreate.launchcreateRichtextRangeeditContentgetBrandKitColorsgetCurrentPageContextgetCurrentPageMetadatagetDefaultPageDimensionsgetDesignColorsgetDesignMetadatagetDesignTemplateMetadatagetDesignTokeninitAppElementopenDesignoverlay.registerOnCanOpenpublish.launchrequestExportselection.registerOnChangesetCurrentPageBackgroundui.startDragToCursorui.startDragToPointui.startDragChangelog
Design: Test
Error
Error: Test
Intents
Intents: Content
Intents: Data
Intents: Design
Intents: Test
Platform
appProcessappProcess.broadcastMessageappProcess.currentappProcess.current.getInfoappProcess.current.requestCloseappProcess.current.setOnDisposeappProcess.requestCloseappProcess.registerOnMessageappProcess.registerOnStateChangefeatures.isSupportedfeatures.registerOnSupportChangegetPlatformInfonotification.addToastrequestOpenExternalUrlChangelog
Platform: Test
User
User: Test
getDesignColors
API reference for the getDesignColors method.
Retrieves the colors currently used in the design.
Usage: Get design colors
import { getDesignColors } from "@canva/design";const { colors } = await getDesignColors();
TYPESCRIPT
Returns
. This is a Promise that resolves with the following object:
colorsDesignColor[]The colors used by elements in the current design.
Not all elements are included, and the colors returned may change. The order of colors is not guaranteed.
A solid color from the user's design.
typestringThe only valid value is "solid".
colorstringThe hexadecimal code representing the color.
This is a 6 character code prefixed with a # symbol.
Example
"#ffffff"
TS
Represents a color type that is currently not supported by the SDK.
One entry is returned per unsupported color in the design (no deduplication).
typestringThe only valid value is "unsupported".