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
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. If a brand has no palette yet, the first request builds one from the brand’s last crawl and stores it. This first request can take some seconds longer. Later requests get the stored palette. A palette built this way has no new render, so themes and onPairs can be empty. The next crawl of the brand replaces it.