Color

On this page

All color parameters in Sirv are applied in the same way, with RGB or RGBA references.

Parameters that have color are:

To set a solid color, use a standard RGB reference such as 01417F in your URL or profile, for example:

https://sirv.sirv.com/Examples/test-vibram.jpg?text.position=south&text=Blue%20text&text.size=50%&text.color=01417F

Example image with customized text overlay

Dominant colors

Sirv can identify the dominant color in each of 64 parts of your image. Each area is divided equally by height and width, like these examples:

Division of image into 8×8 grid for dominant colors
Division of image into 8×8 grid for dominant colors
Division of image into 8×8 grid for dominant colors

Obtain the 64 dominant colors in either JSON or JSONP format by appending ?histogram=rgb&info to your image.

JSON example:

https://demo.sirv.com/example.jpg?histogram=rgb&info

JSONP example:

https://demo.sirv.com/example.jpg?info&callback=abc

Values for the 64 areas are displayed in sets of 8, like so:

  "dominantColors": [
  [
    "#B9B7AE",
    "#A1A6B5",
    "#C0CAD3",
    "#AAA79C",
    "#AEA693",
    "#979385",
    "#D9F9FF",
    "#B3D8F7"
  ],
  [
    "#B0AB99",
    "#908A7D",
    "#C7AF8C",
    "#6C6254",
    "#675343",
    "#806B55",
    "#9AABB6",
    "#A2BCD2"
  ],
  [
    "#B9D3DA",
    "#7D8282",
    "#7A756C",
    "#777B7C",
    "#7F7262",
    "#9C9287",
    "#696157",
    "#6D7782"
  ],
  [
    "#B5CDD5",
    "#858E92",
    "#8F9696",
    "#9A9791",
    "#8C7E70",
    "#847360",
    "#443B32",
    "#3E3F3F"
  ],
  [
    "#A6AAA0",
    "#939CA1",
    "#70757C",
    "#877867",
    "#8F7558",
    "#7D6347",
    "#483A2E",
    "#3A3C41"
  ],
  [
    "#8C7D68",
    "#948C7F",
    "#7C8696",
    "#787379",
    "#5E452F",
    "#695D52",
    "#3B3025",
    "#1A1A18"
  ],
  [
    "#736149",
    "#503F2E",
    "#7C818C",
    "#5D5E65",
    "#3E2D22",
    "#31241B",
    "#36271B",
    "#161511"
  ],
  [
    "#5D564C",
    "#847E76",
    "#84827F",
    "#78746F",
    "#827E79",
    "#68625C",
    "#4D4137",
    "#3C2B1E"
  ]
  ],

Was this article helpful?

Array

Get help from a Sirv expert

help ukraine help ukraine Powered by Ukrainian determination and British ingenuity

How can you support Ukraine