UNPKG
chromatism
Version:
latest (3.0.0)
3.0.0
2.6.0
2.5.8
2.5.7
2.5.6
2.5.5
2.5.4
2.5.3
2.5.2
2.5.1
2.5.0
2.4.4
2.4.3
2.4.2
2.4.1
2.4.0
2.3.2
2.3.1
2.3.0
2.2.1
2.2.0
2.1.0
2.0.1
2.0.0
1.11.0
1.10.0
1.9.1
1.9.0
1.8.1
1.8.0
1.7.1
1.7.0
1.6.0
1.5.1
1.5.0
1.4.1
1.4.0
1.3.1
1.3.0
1.2.0
A simple set of utility functions for colours.
github.com/toish/chromatism
toish/chromatism
chromatism
/
src
/
operations
/
uniformComplementary.js
11 lines
(7 loc)
•
262 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
import
makeColourObject
from
'./convert'
import
convert
from
'../helpers/convert-to-type'
export
default
function
complementary
(
colourRef
) {
var
colour =
convert
(
'hsluv'
, colourRef) colour.
hu
= (colour.
hu
+
180
) %
360
return
makeColourObject
(colour) }