Skip to main content

Complementary Schemes

Complementary color scheme generation has a fixed angle of 180°.

.scheme('complement', { // angle = 180
round: boolean // optional, defaults to true
})

Examples

complement

180°

hsv: { h: 344, s: 100, v: 100, a: 100 }hsv: { h: 164, s: 100, v: 100, a: 100 }

complement

180°

hsv: { h: 256, s: 100, v: 100, a: 100 }hsv: { h: 76, s: 100, v: 100, a: 100 }

complement

180°

hsv: { h: 16, s: 100, v: 100, a: 100 }hsv: { h: 196, s: 100, v: 100, a: 100 }

complement

180°

hsv: { h: 334, s: 50, v: 93, a: 100 }hsv: { h: 154, s: 50, v: 93, a: 100 }

complement

180°

hsv: { h: 340, s: 100, v: 40, a: 100 }hsv: { h: 160, s: 100, v: 40, a: 100 }

JavaScript

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

const scheme1 = Color.from('rgb', [255, 0, 255]).scheme('complement')
// [
// rgb { r: 255, g: 0, b: 255, a: 255, bitDepth: 8, max: 255 },
// rgb { r: 0, g: 255, b: 0, a: 255, bitDepth: 8, max: 255 }
// ]

TypeScript

import Color from 'chromaticity-color-utilities'

const scheme1: Color.rgb[] = Color.from('rgb', [255, 0, 255]).scheme(
'complement'
)