0

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).

TonyLuigiC
  • 185
  • 1
  • 2
  • 13
  • 1
    Post what you've tried or the stage you've gotten to or better yet a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) – pilchard Nov 17 '20 at 09:51
  • Thank you for the reply. I really don't have anything yet, just creating the RGBA color channels by iterating and storing the values in an array. – TonyLuigiC Nov 23 '20 at 07:44

1 Answers1

0

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

TonyLuigiC
  • 185
  • 1
  • 2
  • 13