GraphQL Pantone API Documentation

The Pantone API is using GraphQL queries to fetch color data. The available queries that can be used to fetch data can be found at Pantone API Schema.

The GraphQL Schema data is divided into following sections:

Queries

Get Books:

getBooks {
  id
  title
  info {
    en {
     target
     description
  }
}
}

Get Book:

 getBook(id: "PANTONE_SOLID_COATED") {
  id
  colors [Color]
 }

Get Color:

getColor(code: "105 C") [Color] 

Get Colors by Code:

getColorsByCode(codes: ["3570 C", "3570 U", "16-4535 TPG"]) [Color]

Get Closest colors:

getClosestColors(colorRGB: {r: 4, g: 4, b: 4}, bookId: "PANTONE_SOLID_COATED") [Color]

Get Harmony:

getHarmony(colorCode: "105 C", harmony: ANALOGOUS) [Color]

Objects

ColorObject:

  Object Color {
        code,
        url,
        lab { l a b },
        cmyk {c m y k}
        rgb {r g b}
        pageNumberInBook
        colorValues {
            M0 {
            spectral {
                values
            }
            }
            M1 {
            spectral {
                values
            }
            }
            M2 {
            spectral {
                values
            }
            }
            M3 {
            spectral {
                values
            }
            }
            SpInUVInc {
            spectral {
                values
            }
            }
            SpInUVCal {
            spectral {
                values
            }
            }
            SpInUVExc {
            spectral {
                values
            }
            }
            SpExUVInc {
            spectral {
                values
            }
            }
            SpExUVCal {
            spectral {
                values
            }
            }
            SpExUVExc {
            spectral {
                values
            }
            }
        }
        positionInBook,
        closestColorsInBook {
            code,
            book {
            title
            }
        }
    }
 }

Book Object:

type Book {
 id
 title
 group
 info {
  en {
   target
   description
  }
 }
}

ENUMS

Pantone API has the following Enums:

Books

enum Books {
   pantoneSolidCoated
   pantoneSolidUncoated
   pantoneColorBridgeCoated
   pantoneColorBridgeUncoated
   pantoneExtendedGamutCoated
   pantoneMetallicsSolidCoated
   pantonePastelsNeonsCoated
   pantonePastelsNeonsUncoated
   pantoneFhCottonTcx
   pantoneFhiPaperTpg
   pantoneFhNylonBrightsTn
   pantoneFhiPolyesterTsx
   pantoneFhiMetallicShimmersTpm
   pantoneCmykCoated
   pantoneCmykUncoated
   pantoneSkinToneGuide
}

Harmony

enum Harmony {
   ANALOGOUS
   COMPLEMENTARY
   MONOCHROMATIC
   SPLIT_COMPLEMENTARY
   TRIADIC
   TETRADIC
}

Sending Queries

It is convenient to send requests to the API using a GraphQL client. AWS provides an SDK to easily use AWS AppSync, the
service which hosts the GraphQL API. More documentation can be found at: AWS AppSync Resources.

Below is a query and response example to request a Pantone Book and it’s colors