API Docs for: 3.18.1

Color.Harmony Class

Module: color-harmony
Parent Module: color

Color Harmony provides methods useful for color combination discovery.

Methods

getAnalogous

(
  • str
  • [offset]
  • [to]
)
String public

Defined in color/js/color-harmony.js:77

Available since 3.8.0

Returns an Array of five colors. The first color in the Array will be the color passed in. The remaining four will be analogous colors two in either direction from the initially provided color.

Parameters:

Returns:

getBrightness

(
  • str
)
Number public

Defined in color/js/color-harmony.js:328

Available since 3.8.0

Returns 0 - 100 percentage of brightness from 0 (black) being the darkest to 100 (white) being the brightest.

Parameters:

Returns:

getComplementary

(
  • str
  • [to]
)
Array public

Defined in color/js/color-harmony.js:27

Available since 3.8.0

Returns an Array of two colors. The first color in the Array will be the color passed in. The second will be the complementary color of the color provided

Parameters:

Returns:

getMonochrome

(
  • str
  • [count]
  • [to]
)
String public

Defined in color/js/color-harmony.js:182

Available since 3.8.0

Calculates lightness offsets resulting in a monochromatic Array of values.

Parameters:

Returns:

getOffset

(
  • str
  • adjust
  • [to]
)
String public

Defined in color/js/color-harmony.js:280

Available since 3.8.0

Adjusts the provided color by the offset(s) given. You may adjust hue, saturation, and/or luminance in one step.

Parameters:

Returns:

getSimilar

(
  • str
  • [offset]
  • [count]
  • [to]
)
String public

Defined in color/js/color-harmony.js:226

Available since 3.8.0

Creates an Array of similar colors. Returned Array is prepended with the color provided followed a number of colors decided by count

Parameters:

Returns:

getSimilarBrightness

(
  • str
  • match
  • [to]
)
String public

Defined in color/js/color-harmony.js:352

Available since 3.8.0

Returns a new color value with adjusted luminance so that the brightness of the return color matches the perceived brightness of the match color provided.

Parameters:

Returns:

getSplit

(
  • str
  • [offset]
  • [to]
)
String public

Defined in color/js/color-harmony.js:50

Available since 3.8.0

Returns an Array of three colors. The first color in the Array will be the color passed in. The second two will be split complementary colors.

Parameters:

Returns:

getSquare

(
  • str
  • [to]
)
String public

Defined in color/js/color-harmony.js:157

Available since 3.8.0

Returns an Array of four colors. The first color in the Array will be the color passed in. The remaining three colors are equidistant offsets from the starting color and each other.

Parameters:

Returns:

getTetrad

(
  • str
  • [offset]
  • [to]
)
String public

Defined in color/js/color-harmony.js:130

Available since 3.8.0

Returns an Array of four colors. The first color in the Array will be the color passed in. The remaining three colors are equidistant offsets from the starting color and each other.

Parameters:

Returns:

getTriad

(
  • str
  • [to]
)
String public

Defined in color/js/color-harmony.js:106

Available since 3.8.0

Returns an Array of three colors. The first color in the Array will be the color passed in. The second two will be equidistant from the start color and each other.

Parameters:

Returns:

Properties