> For the complete documentation index, see [llms.txt](https://docs.saas.haut.ai/haut.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.saas.haut.ai/haut.ai/developers/saas-api-overview/api-for-hair-metrics-2.0/color.md).

# Color

Result scheme for the hair Color metric in Hair Metrics 2.0: the area, main metric, sub-metric, and mask fields it returns.

## **Description**

This metric describes the hair’s color. All natural hair colors are determined by the presence of two pigments: eumelanin and pheomelanin. Generally, the more eumelanin is present, the darker the hair color; if less eumelanin is present, the hair color is lighter. Pheomelanin is responsible for giving the hair a red hue.

**`"algorithm_tech_name": "color"`**

## `area_name`

The algorithm returns metrics for the following area:

* `hair`

## `main_metric`

The main metric indicates the hair color category for `area_name`

```javascript
"main_metric": {
                "value": "Brown",
                "widget_type": "category",
                "name": "Color",
                "tech_name": "color",
                "widget_meta": null
            },
```

![](https://245161714-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MWxBX_zB4FnflOpyBGO%2F-MiR_5V3nq8FGSCAlM0O%2F-MiR_BsmQaCZycE9kGqs%2F%D0%94%D0%BE%D0%BA%205_6.jpeg?alt=media\&token=a931d21d-47e4-49e2-b325-b80d74d1071b)

* **`value`** The hair color is divided into six classes, as listed below. Each category gets its own confidence level in the range of `[0,100]`, where the highest score indicates the hair color class:
  * `Brown`
  * `Blond`
  * `Black`
  * `Red`
  * `Gray or White`
  * `Other`
* `"widget_type": "category"`
* `"name": "Color"`
* `"tech_name": "color"`

## `sub_metrics`

The algorithm returns six types of sub-metrics: `Black Color Confidence`,`Brown Color Confidence`, `Blond Color Confidence`, `Gray or White Color Confidence`, `Red Color Confidence` and `Other Color Confidence`.

```javascript
 "sub_metrics": [
                {
                    "value": 0,
                    "widget_type": "numeric",
                    "name": "Black Color Confidence",
                    "tech_name": "black_color_confidence",
                    "widget_meta": null
                },
                {
                    "value": 83,
                    "widget_type": "numeric",
                    "name": "Brown Color Confidence",
                    "tech_name": "brown_color_confidence",
                    "widget_meta": null
                },
                {
                    "value": 1,
                    "widget_type": "numeric",
                    "name": "Blond Color Confidence",
                    "tech_name": "blond_color_confidence",
                    "widget_meta": null
                },
                {
                    "value": 0,
                    "widget_type": "numeric",
                    "name": "Gray or White Color Confidence",
                    "tech_name": "gray or white_color_confidence",
                    "widget_meta": null
                },
                {
                    "value": 33,
                    "widget_type": "numeric",
                    "name": "Red Color Confidence",
                    "tech_name": "red_color_confidence",
                    "widget_meta": null
                },
                {
                    "value": 0,
                    "widget_type": "numeric",
                    "name": "Other Color Confidence",
                    "tech_name": "other_color_confidence",
                    "widget_meta": null
                }
                ]
```

* **`Black Color Confidence`** evaluates black color's confidence level
  * **`value`** of the black color confidence level ranges from `[0,100]`*. A higher score is associated with a higher chance of the hair being black in color*
  * `"widget_type": "numeric"`
  * `"name": "Black Color Confidence"`
  * `"tech_name": "black_color_confidence"`
* **`Brown Color Confidence`** evaluates brown color's confidence level
  * **`value`** of the brown color confidence level ranges from `[0,100]`*. A higher score is associated with a higher chance of the hair being brown in color*
  * `"widget_type": "numeric"`
  * `"name": "Brown Color Confidence"`
  * `"tech_name": "brown_color_confidence"`
* **`Blond Color Confidence`** evaluates blond color's confidence level
  * **`value`** of the blond color confidence level ranges from `[0,100]`*. A higher score is associated with a higher chance of the hair being blond in color*
  * `"widget_type": "numeric"`
  * `"name": "Blond Color Confidence"`
  * `"tech_name": "blond_color_confidence"`
* **`Gray or White Color Confidence`** evaluates gray color confidence level
  * **`value`** of the gray and white color confidence level ranges from `[0,100]`*. A higher score is associated with a higher chance of the hair being gray or white in color*
  * `"widget_type": "numeric"`
  * `"name": "Gray or White Color Confidence"`
  * `"tech_name": "gray or white_color_confidence"`
* **`Red Color Confidence`** evaluates red color's confidence level
  * **`value`** of the red color confidence level ranges from `[0,100]`*. A higher score is associated with a higher chance of the hair being red in color*
  * `"widget_type": "numeric"`
  * `"name": "Red Color Confidence"`
  * `"tech_name": "red_color_confidence"`
* **`Other Color Confidence`** evaluates other colors' confidence level
  * **`value`** of the "other" color confidence level ranges from `[0,100]`*. A higher score is associated with a higher chance of the hair being "other" in color*
  * `"widget_type": "numeric"`
  * `"name": "Other Color Confidence"`
  * `"tech_name": "other_color_confidence"`

## `masks_restored`

**None** **-** there are no restored masks for hair color

## `masks_original`

**None -** there are no original masks for hair color

***

{% hint style="warning" %}
Not a Haut.AI client yet?
{% endhint %}

<a href="https://haut.ai/book-a-demo?utm_source=referral&#x26;utm_medium=saas_docs&#x26;utm_campaign=Docs_SaaS_HautAI" class="button primary" data-icon="user-vneck">Book a demo</a> <a href="https://haut.ai/product/ai-skin-analysis?utm_source=referral&#x26;utm_medium=saas_docs&#x26;utm_campaign=Docs_SaaS_HautAI" class="button secondary" data-icon="external-link">Platform overview on haut.ai</a>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.saas.haut.ai/haut.ai/developers/saas-api-overview/api-for-hair-metrics-2.0/color.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
