Skip to main content
Every brand response carries colors: the brand’s accent, dark, and light colors. Add palette=true to a Brand API request to get the brand’s full color system. palette=1 does the same:
Palette
To see a brand’s palette before writing a request, look it up in the Brandfetch playground. The response gains one key, palette. The rest of the response does not change. A request without the parameter, or with another value, does not change. The palette object holds:
  • colors: the ranked colors. Each color has a role such as primary or background, and a context of identity, interface, or both. Each color also has the text color that reads best on it.
  • onPairs: the background and text pairs that the brand’s website uses, with their WCAG contrast.
  • themes: the light and dark themes that the website showed.
  • gradients: the gradients in the brand’s stylesheets.
  • logos: the colors of each logo and icon.
Each color also says where the website uses it:
  • usage: the elements that the website paints with the color, such as button backgrounds or link text, with counts and example labels. This is the field to read when you want to know what a color is for.
  • tokens: the website’s own CSS variable names for the color, such as hds-color-core-brand-500.
  • variants: the near-identical HEX codes that Brandfetch merged into the color.
When Brandfetch finds no color that it can defend as the brand’s color, no color has the role primary. An integration that shows one brand color has nothing to show for that brand. A color that only a theme, gradient, on-pair, or logo references is also in colors, with rank: null and member: true. To get the brand colors alone, keep the colors with a rank. The first palette request for a brand can take a few seconds longer, and its themes and onPairs can be empty until the brand is next refreshed. palette is null when Brandfetch couldn’t build one for the brand, for example when its website gave no colors to read, and a later request can return it.