Giter VIP home page Giter VIP logo

gl-react-color-matrix's Introduction

gl-react-color-matrix ![](https://img.shields.io/badge/gl--react->= 2.1-05F561.svg)

Universal gl-react color-matrix effect

Props

  • children (required): the content to color-matrix.
  • matrix (required): an array of 16 numbers that represents a 4x4 color matrix (rgba x rgba).

Usage Examples

var ColorMatrix = require("gl-react-color-matrix").ColorMatrix;
// or
import {ColorMatrix} from "gl-react-color-matrix";

Identity

<ColorMatrix matrix={[
  1, 0, 0, 0,
  0, 1, 0, 0,
  0, 0, 1, 0,
  0, 0, 0, 1
]}>
  ...
</ColorMatrix>

Let only RED through

<ColorMatrix matrix={[
  1, 0, 0, 0,
  0, 0, 0, 0,
  0, 0, 0, 0,
  0, 0, 0, 1
]}>
  ...
</ColorMatrix>

Grayscale (approximative)

<ColorMatrix matrix={[
  .3, .3, .3, 0,
  .6, .6, .6, 0,
  .1, .1, .1, 0,
   0,  0,  0, 1
]}>
  ...
</ColorMatrix>

gl-react-color-matrix's People

Contributors

gre avatar vyorkin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gl-react-color-matrix's Issues

Convert single color to transparent

Hi!
As I understand, I can convert color on image to transparent using color-matrix.
Can you help me to convert one color on image (#f8f8f8) to transparent on png image?

Error on latest React Native versions [RN 0.50.3]

  "dependencies": {
                "gl-react": "v3",
                "gl-react-color-matrix": "^1.1.0",
                "gl-react-dom": "^2.2.9",
                "gl-react-native": "^2.47.0",
                "prop-types": "^15.6.0",
                "react": "16.0.0",
                "react-native": "^0.50.3",
                "react-native-webgl": "^0.7.0"
        },"

Here are my dependencies. I am aware Proptypes was moved to different package but editing line 3 import in colorMatrix.js to import PropTypes from 'prop-types' even did not fixed it. I hope i was trying to fix the right thing. Anyways here's the screenshot of error.

simulator screen shot - iphone 6 - 2017-11-15 at 14 34 31

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.