Skip to main content

Definition

Assembly: Mintlify.Core.dll Namespace: Mintlify.Core.Converters Inheritance: System.Text.Json.Serialization.JsonConverter<Mintlify.Core.Models.ColorConfig>

Syntax

Summary

Handles JSON conversion for color properties that can be either strings or objects.

Remarks

Color configurations in Mintlify can be specified as:
  • String: Simple hex color value (e.g., “#FF0000”)
  • Object: Complex color configuration with light and dark mode properties

Constructors

.ctor

Syntax

Methods

CanConvert Override

Determines whether the specified type can be converted by this converter.

Syntax

Parameters

Returns

Type: bool True if the type is ColorConfig; otherwise, false.

Read Override

Reads and converts the JSON to a ColorConfig object.

Syntax

Parameters

Returns

Type: Mintlify.Core.Models.ColorConfig? A ColorConfig object.

Exceptions

Write Override

Writes the ColorConfig object to JSON.

Syntax

Parameters