https://github.com/hughsk/lut
Render RGB lookup tables to a canvas element
https://github.com/hughsk/lut
Last synced: 3 months ago
JSON representation
Render RGB lookup tables to a canvas element
- Host: GitHub
- URL: https://github.com/hughsk/lut
- Owner: hughsk
- License: other
- Created: 2013-01-27T11:52:15.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2022-03-05T08:02:25.000Z (over 3 years ago)
- Last Synced: 2024-10-17T16:40:05.785Z (8 months ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 25
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# lut #

Renders [RGB lookup tables](http://the-witness.net/news/2012/08/fun-with-in-engine-color-grading/) to a canvas element.
## Installation ##
``` bash
npm install lut
```## Usage ##
`lut(red, green, blue, canvas)`
``` javascript
var lut = require('lut')
, canvas = document.createElement('canvas')// Defaults to 32x32x32, creating a new canvas element:
document.body.appendChild(lut())// But you can render on top of an existing canvas,
// and specify the resolution (number of shades) for
// each colour too:
document.body.appendChild(canvas)
lut(64, 8, 128, canvas)
```