Skip to content

ColorField

Defined in: packages/core/src/fields/color/types.ts:91

Resolved configuration for a color() field, after all defaults are applied.

This is the type framework adapters and field components receive — fieldDef in InputComponentProps<ColorField> and CellComponentProps<ColorField> is this type.

  • ColorFieldInput for the user-facing input type
  • color for the config function that produces this type

TFieldMeta extends object = { }

admin: FieldAdminConfig

Defined in: packages/core/src/fields/baseTypes.ts:243

Resolved admin UI configuration with all defaults applied.

BaseField.admin


optional defaultValue?: string

Defined in: packages/core/src/fields/color/types.ts:98

Pre-filled value shown in the admin form when creating a new document. Defaults to "" — an empty picker.

BaseField.defaultValue


optional description?: string

Defined in: packages/core/src/fields/baseTypes.ts:252

Semantic description of the field. Used in three places:

  1. Helper text rendered below the field input in the admin form UI.
  2. As the Zod .meta({ description }) value for form validation.
  3. As the JSDoc comment on the generated document interface property.

To write a separate JSDoc comment, use interfaceDescription in addition.

BaseField.description


format: "hex" | "rgb" | "hsl" | "oklch"

Defined in: packages/core/src/fields/color/types.ts:100

The CSS notation the picker writes.


optional index?: string

Defined in: packages/core/src/fields/baseTypes.ts:256

Convex index name for this field.

BaseField.index


optional interfaceDescription?: string

Defined in: packages/core/src/fields/baseTypes.ts:254

The JSDoc comment on the generated document interface property

BaseField.interfaceDescription


interfaceType: string

Defined in: packages/core/src/fields/baseTypes.ts:258

TypeScript type string written to generated document interfaces (e.g. "string", "number", "string[]").

BaseField.interfaceType


label: string

Defined in: packages/core/src/fields/baseTypes.ts:234

Display label shown in the admin form. Always set — inferred from the field key if not provided.

BaseField.label


meta: TFieldMeta

Defined in: packages/core/src/fields/baseTypes.ts:259

BaseField.meta


required: boolean

Defined in: packages/core/src/fields/baseTypes.ts:236

Whether this field is required in the database schema.

BaseField.required


themeColors: boolean

Defined in: packages/core/src/fields/color/types.ts:102

Whether the picker offers the host app’s design tokens as a second tab.


readonly type: "color"

Defined in: packages/core/src/fields/color/types.ts:93