This GraphQL query fetches the RGB code of a color by its name.
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
query ColorByName { colors(where: { name: { equalTo: "Black olive" } }) { results { name hexCode redHex greenHex blueHex redDecimal greenDecimal blueDecimal redFraction greenFraction blueFraction } } }
{ "data": { "colors": { "results": [ { "name": "Black olive", "hexCode": "#3B3C36", "redHex": "3B", "greenHex": "3C", "blueHex": "36", "redDecimal": 59, "greenDecimal": 60, "blueDecimal": 54, "redFraction": 0.23, "greenFraction": 0.24, "blueFraction": 0.21 } ] } } }