palette

Type: <boolean>
Default: false
It enables color schema information over the images data field detected over the target url.
  • CLI
  • JavaScript
  • Shell
  • Python
  • Ruby
const mql = require('@microlink/mql')

const { status, data } = await mql('https://microlink.io', { palette: true })

mql.render(data)
The following fields will be added per each image detected in the payload:
  • palette <string[]>: A collection of hexadecimal colors from most dominant color to least.
  • background_color <string>: The best color with good that can be used as background color representation of the image.
  • color <string>: The best color overlayed over background_color.
  • alternative_color <string>: It will be the second best color. If there are only two colors parsed, it will default to color.