Skip to main content

Function: matchHexToPms()

matchHexToPms(hex, maxDistance?): object[]

Matches an input hex code (RRGGBB) to a number of PMS values. If an exact match is found, it will always be the first value in the resulting array.

Parameters​

hex​

string

A string containing the hexadecimal representation of a color, presented as RRGGBB (case sensitive).

maxDistance?​

number = 64

The maximum distance the input can be from a PMS color to be considered a match.

Returns​

object[]

An array of PMS color strings.