Skip to main content

HSI

Hue, Saturation, Intensity

Hue value is between 0 and 360. Saturation, intensity, and alpha are between 0 and 100 (as in, percent).

New Color

Color.from('hsi',[h, s, v, a?])

Conversion to

.to('hsi',{
round: boolean // optional, default = true
})

Get methods

.getH(): number
.getS(): number
.getI(): number
.getA(): number // if alpha is not set, defaults to 100

JavaScript

const Color = require('chromaticity-color-utilities')

const color1 = Color.from('hsi', [300, 100, 67])
const color3 = color2.to('hsi')

TypeScript

import Color from 'chromaticity-color-utilities'

const c: Color.hsi = Color.from('hsi', [300, 100, 67])