# ConvertColorToString

Converts a color value to its string representation.

## Syntax

```typescript
ConvertColorToString(color_value: number | string, color_name = false): string
```

## Parameters

* `color_value`: `number | string` - The color value to convert
* `color_name`: `boolean` - Whether to return the color name instead of RGB values

## Return Value

Returns a `string` representing the color either as:

* RGB components (e.g., "255,0,0")
* Color name (e.g., "clrRed") if color\_name is true and a matching name exists

## Description

The `ConvertColorToString` method converts a color value into a string representation. It can:

1. Convert numeric color values to RGB component strings
2. Convert hex color strings to RGB component strings
3. Find and return matching color names when requested

The method supports both numeric color values and hex string inputs, making it versatile for different color formats.

## Example

```typescript
// Using numeric input
const redString = this.api.ConvertColorToString(0xff0000) // Returns "255,0,0"
const blueString = this.api.ConvertColorToString(0x0000ff) // Returns "0,0,255"

// Using hex string input
const greenString = this.api.ConvertColorToString('#00FF00') // Returns "0,255,0"

// Getting color names
const redName = this.api.ConvertColorToString(0xff0000, true) // Returns "clrRed"
const blueName = this.api.ConvertColorToString(0x0000ff, true) // Returns "clrBlue"

// Custom colors (may not have names)
const customColor = this.api.ConvertColorToString(0x123456, true) // Returns "18,52,86"
```
