Universal gl-react which combines Contrast, Saturation and Brightness effects
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
src
.gitignore
.npmignore init Dec 5, 2015
README.md upgrade to gl-react v3 Nov 1, 2017
package.json

README.md

gl-react-contrast-saturation-brightness

Universal gl-react contrast-saturation-brightness effect.

Props

  • children (required): the content to contrast-saturation-brightness.
  • contrast: positive number.
  • saturation: positive number. values from 0.0 (grayscale) to 1.0 (identity) produces a color desaturation. Values higher than 1.0 produce a color saturation.
  • brightness: positive number.

in contrast, saturation, brightness props, 0.0 means 0% and 1.0 means 100%.

Usage Examples

var ContrastSaturationBrightness = require("gl-react-contrast-saturation-brightness").ContrastSaturationBrightness;
// or
import {ContrastSaturationBrightness} from "gl-react-contrast-saturation-brightness";

Grayscale

<ContrastSaturationBrightness saturation={0.0}>...</ContrastSaturationBrightness>

Some contrast and brightness

<ContrastSaturationBrightness contrast={1.4} brightness={1.2}>...</ContrastSaturationBrightness>