getBrandKitColors
This API is a preview. Preview APIs are unstable and may change without warning. You can't release public apps using this API until it's stable.
Retrieves the current Brand Kit colors for the design.
Usage: Get Brand Kit colors
import { getBrandKitColors } from "@canva/design";const { palettes } = await getBrandKitColors();
Returns
Response containing the current Brand Kit colors for the design. This is a Promise that resolves with the following object:
palettesBrandKitPalette[]The list of palettes in the current Brand Kit for the design.
This may be empty if there is no Brand Kit for the design, or the current Brand Kit has no palettes.
colorsDesignColor[]The colors in the palette.
This may be empty if the palette has no colors.
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 the '#' symbol, e.g. "#ffffff".
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".