Chroma Key

🚧

EXPERIMENTAL FEATURE

This experimental feature has been made available for you to try so that your feedback can be included in our development process. This feature is still under development and is subject to change without notice. It may be replaced or even removed. It is not intended for use in a production capacity. We do however, encourage you to use it in staging or on pre-production traffic, and to email us with your feedback

Use Chroma Key to change any color in an image within the specified volume of the HSL colorspace to transparent or semitransparent. This transformation applies a "green screen" technique commonly used to isolate and remove background colors.

The default parameters are effective for removing a well shot "green screen" from an image. Additional settings are available to isolate and remove color that varies in hue, saturation, and lightness.

  • hue specifies the hue to remove. Enter the degree of rotation between 0 and 360 degrees around the color wheel. By default Chroma Key removes a green hue, 120° on the color wheel.

  • hueTolerance specifies how close a color's hue needs to be to the selected hue for it to be changed to fully transparent. If you enter the maximum value of 1.0 the entire image is made transparent. By default hueTolerance is approximately 0.083 or 8.3% of the color wheel. This value corresponds to 30° around the specified hue.

  • hueFeather defines how much additional hue to make semi-transparent beyond the hueTolerance. By default hueFeather is 0.083 which applies semi-transparency to hues 30° around the hueTolerance.

  • saturationTolerance specifies how close a color's saturation needs to be to full saturation for it to be changed to fully transparent. For example, you can define how green the color needs to be to remove it from your image. The default value of 0.75 means that a color must be within 75% of full saturation in order to be made fully transparent.

  • saturationFeather defines how much additional saturation to make semi-transparent beyond the saturationTolerance. By default saturationFeather is 0.1 which applies semi-transparency to hues 10% below the saturationTolerance.

  • lightnessTolerance defines how much of the lightest part and darkest part of a color to preserve. For example, you can space this value out from the middle (i.e. 0.5 lightness or full color) to help preserve the splash lighting impact in the image. You can define how close the color needs to be to the full color to remove it from your image. The default value of 0.75 means that a color must be within 75% of the full color towards full white or full black for full removal.

  • lightnessFeather defines how much additional lightness to make semi-transparent beyond the lightnessTolerance. The default value of 0.1 corresponds to 10% away from the tolerated lightness towards full black or full white.

If you add the IMQuery transformation to a policy, use the im variable, and select Chroma Key, you can use a query string to change a color in an image to transparent or semitransparent. See Syntax and Examples for the syntax for the query string parameter.