Skip to content

Color Manipulation Options

By , Customer Success DirectorUpdated

Open this page in a new chat

Short answer

Every color option in Sirv takes an RGB or RGBA hex code, such as 01417F, without the # sign. That includes text, outline, frame, canvas, vignette and watermark colors. Sirv can also report the 64 dominant colors of an image as JSON: add ?histogram=rgb&info to the image URL.

After reading this you will know

  • How to set any color option with an RGB or RGBA code
  • Which options take a color
  • How to get the dominant colors of an image

Every Sirv option that takes a color, such as text, frame or vignette colors, accepts it the same way, as an RGB or RGBA value. Pick a color in the demo below to see the value to use.

Try it
Original imageImage with the options appliedOriginalWith options
40
0
0
0
0
0
0
0
https://demo.sirv.com/hang.jpg?saturation=40

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

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"
]
],

Use these hex values to match page backgrounds, placeholders or product filters to the colors in each image.

Back to top