Skip to Content

Color

Provides color information in HEX, RGB, and HSL formats.

Type Definition

type Color { color: String rgb: String hsl: String }

Fields

FieldTypeDescriptionNullableRelationship
colorStringColor as a HEX string (e.g., #RRGGBB)YesNone
rgbStringColor as an RGB string (e.g., rgb(255, 255, 255))YesNone
hslStringColor as an HSL string (e.g., hsl(0, 0%, 100%))YesNone

Relationships

The Color type is a standalone object representing color values in different string formats. It does not have direct relationships to other object types but can be used within other types to provide color information.

Usage Examples

Basic Query

{ color { color rgb hsl } }

Field Selection

{ color { color } }
{ color { rgb hsl } }

Nested Queries

Since Color is typically nested within other objects, here is an example assuming a parent object Product has a color field of type Color:

{ product(id: 12345) { id title color { color rgb hsl } } }

Filtering and Sorting

The Color type itself does not support filtering or sorting directly as it contains only scalar string fields representing color values. Filtering or sorting by color would need to be implemented at the parent object level.

Implements

This type does not implement any interfaces.

Connections

The Color type does not have connections to other types or paginated lists.

Color can be used as a field type within other object types that require color representation, such as product variants, themes, or design elements.

Best Practices

  • Use the color field to get the HEX representation when working with web color codes.
  • Use rgb or hsl fields when you need color values in those specific formats for CSS or color manipulation libraries.
  • Always check for null values as all fields are optional.
  • When nesting Color inside other objects, select only the fields you need to optimize query performance.

Notes

  • All color fields are optional and may return null if the color information is not available.
  • The API currently requires no authentication, but this may change in future versions.
  • Since the color fields are simple strings, caching and performance impact are minimal.
  • No computed or derived fields exist on the Color type; it only returns stored color values.
  • No field arguments are defined for this type.
Last updated on