Implements

Constructors

Properties

options: Options

Methods

  • Converts a numeric color value to hex color string.

    Parameters

    • color: number

      The numeric color value to convert.

    Returns Promise<string>

    A promise that resolves to the hex color string in format "#RRGGBB".

  • Parameters

    • hexColor: string

    Returns Promise<number>

  • 创建一个 R public static async create(options?: Options): Promise { RenderOptions._allowInstantiation = true; // Allow instantiation const instance = new this(options); RenderOptions._allowInstantiation = false; // Reset the flag after instantiation await instance._createRenderOptions(); return instance; } /** 销毁当前对象。

    Returns Promise<void>

  • 获取背景颜色。

    Returns Promise<string>

    一个解析为背景颜色的 Promise。十六进制颜色字符串,格式为 "#RRGGBB"。

  • 获取颜色模式。

    Returns Promise<number>

    一个解析为颜色模式的 Promise。

  • 获取前景色。

    Returns Promise<string>

    一个解析为前景色的 Promise。十六进制颜色字符串,格式为 "#RRGGBB"。

  • 获取渲染标志。

    Returns Promise<string>

    一个解析为渲染标志的 Promise。

  • 设置背景颜色。

    Parameters

    • color: string

      要设置的背景颜色。十六进制颜色字符串,格式为 "#RRGGBB"。

    Returns Promise<void>

    当背景颜色设置完成时会被解析的 Promise。

  • 设置前景颜色。

    Parameters

    • color: string

      要设置的前景颜色。十六进制颜色字符串,格式为 "#RRGGBB"。

    Returns Promise<void>

    当前景颜色设置完成时会被解析的 Promise。