YIQ
NTSC Color
- Y = luma
- I = in-phase
- Q = quadrature
When normalized:
- Y is between 0 and 255
- I and Q are between -128 and 128
When not normalized:
- Y is between 0 and 1
- I is between -0.5957 and 0.5957
- Q is between -0.5226 and 0.5226
New Color
Color.from('yiq', [y, i, q], {
normalized: boolean, // optional, default = true
})
Conversion to
.to('yiq', {
normalize: boolean, // optional, default = true
round: boolean, // optional, default = true (ignored/false if not normalized)
})
Get methods
.getY(): number
.getI(): number
.getQ(): number
JavaScript
const Color = require('chromaticity-color-utilities')
const color1 = Color.from('yiq', [105, 59, 128])
const color3 = color2.to('yiq')
const color4 = Color.from('yiq', [0.413, 0.2746, 0.5226], { normalized: false })
TypeScript
import Color from 'chromaticity-color-utilities'
const c: Color.yiq = Color.from('yiq', [105, 59, 128])