The Database Hub is home for developers who want to clone, connect, and share databases and build apps together. By connecting to a database, you can easily consume its data using an API (GraphQL or REST) or via SDK.
This GraphQL query fetches the RGB code of a color by its name.
xxxxxxxxxx
query ColorByName {
colors(where: { name: { equalTo: "Black olive" } }) {
results {
name
hexCode
redHex
greenHex
blueHex
redDecimal
greenDecimal
blueDecimal
redFraction
greenFraction
blueFraction
}
}
}
xxxxxxxxxx
{
"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
}
]
}
}
}
We use cookies to provide our services and for analytics and marketing. To find out more about our use of cookies, please see our Terms of Service and Privacy Policy . By continuing to browse our website, you agree to our use of cookies.