Definition

Assembly: Mintlify.Core.dll Namespace: Mintlify.Core.Models Inheritance: System.Object

Syntax

Mintlify.Core.Models.ColorConfig

Summary

Represents a color configuration for Mintlify. Can be a simple hex color string or a complex color pair configuration with light and dark modes.

Constructors

.ctor

Initializes a new instance of the ColorConfig class.

Syntax

public ColorConfig()

.ctor

Initializes a new instance of the ColorConfig class with a single color.

Syntax

public ColorConfig(string color)

Parameters

NameTypeDescription
colorstring?The hex color string for both light and dark modes.

.ctor

Initializes a new instance of the ColorConfig class with separate light and dark colors.

Syntax

public ColorConfig(string light, string dark)

Parameters

NameTypeDescription
lightstring?The hex color string for light mode.
darkstring?The hex color string for dark mode.

Properties

Dark

Gets or sets the color in hex format to use in dark mode.

Syntax

public string Dark { get; set; }

Property Value

Type: string?

Light

Gets or sets the color in hex format to use in light mode.

Syntax

public string Light { get; set; }

Property Value

Type: string?

Methods

ToString

Returns the string representation of the color configuration.

Syntax

public override string ToString()

Returns

Type: string The light color, dark color, or empty string.