RGB
Adjusts the amount of color in each of the RGB channels.
How to use
The RGB transformation allows you to adjust the amount of color in each of the Red, Green, and Blue channels independently. This gives you fine-grained control over the color balance of your image.
Pass the following query param
rgb=r,g,b
to the API endpoint, where r, g, and b are percentage values for each channel.
For example: rgb=50,-30,20
Valid values for each channel range from -100
to 100
. The default value is 0
for each channel, which leaves the image unchanged.
- Positive values increase the intensity of the color channel.
- Negative values decrease the intensity of the color channel.
- A value of 0 leaves the channel unchanged.
Effect of RGB Adjustment
- Red channel: Affects the amount of red in the image. Positive values make reds more vibrant, while negative values reduce red tones.
- Green channel: Controls the green tones. Positive values enhance green hues, while negative values diminish them.
- Blue channel: Influences blue colors. Positive values intensify blues, while negative values subdue them.
This transformation can be used to correct color casts, create artistic effects, or fine-tune the color balance of your images.
Original Image
URL : https://www.thunderimage.com/sample/yosemite.jpg
Image with RGB adjustment
URL: /transform?url=https://www.thunderimage.com/sample/yosemite.jpg&rgb=50,-30,20
In this example, we’ve increased the red channel by 50%, decreased the green channel by 30%, and increased the blue channel by 20%. This results in a warmer, slightly more vibrant image with reduced green tones.
Best Practices
- Use small increments (e.g., -10 to 10) for subtle adjustments.
- Experiment with different combinations to achieve the desired color balance.
- Remember that extreme values may lead to color distortion or loss of detail in certain areas of the image.
Authorizations
API key required for authentication
Query Parameters
The URL of the image to be transformed.
Adjusts the amount of color in each of the RGB channels. Format: r,g,b where each value is a percentage ranging from -100 to 100. Default is 0 for each channel.
Response
The transformed image in JPEG format.