Description Usage Arguments Value Examples
Get the median (or mean or user-defined function) colour value of a specified patch of pixels on an image. This is useful for matching background colours.
1 2 3 4 5 6 7 8 9 |
img |
The image |
x1 |
starting x pixel of patch |
x2 |
ending x pixel of patch |
y1 |
starting y pixel of patch |
y2 |
ending y pixel of patch |
color |
The type of color to return (hex, rgb) |
func |
The function to apply to an array of rgba values to determine the central colour (defaults to median) |
hex or rgba color value
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.