Changing Contrast and Saturation for a given Color Channel in JavaScript

317 views Asked by At

I know how to build color channels in JavaScript (iterate through an image and place each color value in an array). I would like to be able to change Contrast and Saturation for a given color channel. For example, use the CSS3 Contrast or Saturation filter to apply changes only to the Red channel.

Thank you

PS: I'm staying with Pure JavaScript here (no 3rd party libraries).

1

There are 1 answers

0
TonyLuigiC On

This would appear to answer my question: Using an SVG filter to access the color channels and then manipulating the color channels with the feColorMatrix filter:

SVG filters: adjust color channels