
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
react-native-color-matrix-image-filters
Advanced tools
Various color matrix based image filters for iOS & Android
Various color matrix based image filters for iOS & Android.
Image, ImageBackground, react-native-fast-image and expo‑image componentsnpm i react-native-color-matrix-image-filters
if using "old" architecture:
npx pod-install
if using "new" architecture:
RCT_NEW_ARCH_ENABLED=1 npx pod-install
This module is meant to be used for simple stuff, like "grayscaling inactive user avatar" etc. Check react-native-image-filter-kit if you need some advanced features like image blending/composing, extracting filtering results to file system and ability to create custom filters.
import { Image } from 'react-native'
import {
Grayscale,
Sepia,
Tint,
ColorMatrix,
concatColorMatrices,
invert,
contrast,
saturate
} from 'react-native-color-matrix-image-filters'
const GrayscaledImage = (imageProps) => (
<Grayscale>
<Image {...imageProps} />
</Grayscale>
)
const CombinedFiltersImage = (imageProps) => (
<ColorMatrix matrix={concatColorMatrices(sepia(), tint(1.25))}>
<Image {...imageProps} />
</ColorMatrix>
)
const ColorMatrixImage = (imageProps) => (
<ColorMatrix matrix={concatColorMatrices(saturate(-0.9), contrast(5.2), invert())}>
<Image {...imageProps} />
</ColorMatrix>
)
| Original | Grayscaled |
|---|---|
![]() | ![]() |
| CombinedFilters | ColorMatrix |
|---|---|
![]() | ![]() |
Each filter support all of View props.
Also some filters have optional amount prop which takes a number. ColorMatrix filter
has matrix prop which takes a Matrix - an array of 20 numbers. Additionally library exports
functions like grayscale, tint etc. - these functions return values of Matrix type and their
results can be combined with concatColorMatrices function.
| Component | Additional props | function |
|---|---|---|
| ColorMatrix | matrix: Matrix | - |
| Normal | - | normal(): Matrix |
| RGBA | red: number = 1, green: number = 1, blue: number = 1, alpha: number = 1 | rgba(red: number = 1, green: number = 1, blue: number = 1, alpha: number = 1): Matrix |
| Saturate | amount: number = 1 | saturate(amount: number = 1): Matrix |
| HueRotate | amount: number = 0 | hueRotate(amount: number = 0): Matrix |
| LuminanceToAlpha | - | luminanceToAlpha(): Matrix |
| Invert | - | invert(): Matrix |
| Grayscale | amount: number = 1 | grayscale(amount: number = 1): Matrix |
| Sepia | amount: number = 1 | sepia(amount: number = 1): Matrix |
| Nightvision | - | nightvision(): Matrix |
| Warm | - | warm(): Matrix |
| Cool | - | cool(): Matrix |
| Brightness | amount: number = 1 | brightness(amount: number = 1): Matrix |
| Contrast | amount: number = 1 | contrast(amount: number = 1): Matrix |
| Temperature | amount: number = 1 | temperature(amount: number = 1): Matrix |
| Tint | amount: number = 0 | tint(amount: number = 0): Matrix |
| Threshold | amount: number = 0 | threshold(amount: number = 0): Matrix |
| Technicolor | - | technicolor(): Matrix |
| Polaroid | - | polaroid(): Matrix |
| ToBGR | - | toBGR(): Matrix |
| Kodachrome | - | kodachrome(): Matrix |
| Browni | - | browni(): Matrix |
| Vintage | - | vintage(): Matrix |
| Night | amount: number = 0.1 | night(amount: number = 0.1): Matrix |
| Predator | amount: number = 1 | predator(amount: number = 1): Matrix |
| Lsd | - | lsd(): Matrix |
| ColorTone | desaturation: number = 0.2, toned: number = 0.15, lightColor: string = "#FFE580", darkColor: string = "#338000" | colorTone(desaturation: number = 0.2, toned: number = 0.15, lightColor: string = "#FFE580", darkColor: string = "#338000"): Matrix |
| DuoTone | firstColor: string = "#FFE580", secondColor: string = "#338000" | duoTone(firstColor: string = "#FFE580", secondColor: string = "#338000"): Matrix |
| Protanomaly | - | protanomaly(): Matrix |
| Deuteranomaly | - | deuteranomaly(): Matrix |
| Tritanomaly | - | tritanomaly(): Matrix |
| Protanopia | - | protanopia(): Matrix |
| Deuteranopia | - | deuteranopia(): Matrix |
| Tritanopia | - | tritanopia(): Matrix |
| Achromatopsia | - | achromatopsia(): Matrix |
| Achromatomaly | - | achromatomaly(): Matrix |
Image component, but in theory it should work with
any image that conforms to CMIFImageView protocol or is based on Android ImageView classreact-native-fast-image is not required - this module doesn't depend on itFAQs
Various color matrix based image filters for iOS & Android
The npm package react-native-color-matrix-image-filters receives a total of 30,170 weekly downloads. As such, react-native-color-matrix-image-filters popularity was classified as popular.
We found that react-native-color-matrix-image-filters demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.