<br />

Added: 7

## **PROTOCOLS**

## ColorAdjustment

*Defined in [fuchsia.ui.brightness/color_adjustment.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/color_adjustment.fidl;l=10)*

Allows clients to request changes to the screen's color adjustment matrix.
This protocol should be implemented and served by the owner of screen presentation.
Added: 16

<br />

### SetDiscreteColorAdjustment

Called to change the color adjustment to a discrete value.
The server will send a response once the request has been serviced.
A client can then use this response to determine when to make
additional calls when limiting the amount of requests being sent.

#### Request

| Name | Type |
|---|---|
| `color_adjustment` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#ColorAdjustmentTable` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#ColorAdjustment_SetDiscreteColorAdjustment_Result` |

## ColorAdjustmentHandler

*Defined in [fuchsia.ui.brightness/color_adjustment.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/color_adjustment.fidl;l=24)*

Handler implemented by the owner of the presentation.
The UI component that controls brightness and screen tint uses this protocol to request changes
to the screen's color adjustment matrix.

<br />

### SetColorAdjustment

Called when the color adjustment has changed.

#### Request

| Name | Type |
|---|---|
| `color_adjustment` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#ColorAdjustmentTable` |

## Control

*Defined in [fuchsia.ui.brightness/brightness.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/brightness.fidl;l=44)*

Control provides an interface to manage the brightness component.

<br />

### GetMaxAbsoluteBrightness

Gets the maximum supported backlight brightness in nits, if known.
Deprecated: 33

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#Control_GetMaxAbsoluteBrightness_Result` |

### SetAutoBrightness

Turns the auto-brightness mode on.
SetManualBrightness will turn it off.

#### Request

\<EMPTY\>

### SetAutoBrightnessAdjustment

Sets the brightness adjustment.
This will change the brightness curve by the factor of the adjustment.
The adjustment is in the range of -1.0 to 1.0.

#### Request

| Name | Type |
|---|---|
| `adjustment` | `float32` |

### SetBrightnessTable

Sets the brightness curve as a set of points.
This will override the built-in brightness curve.
The default brightness curve will be used if the table is empty.
The connection will be closed if table errors are detected.

#### Request

| Name | Type |
|---|---|
| `table` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#BrightnessTable` |

### SetManualBrightness

Turns auto-brightness mode off.
Used by e.g. Settings to set manual brightness using a slider
Value is in the range 0.0 to 1.0 representing min to max and
will be clamped if out of range.

#### Request

| Name | Type |
|---|---|
| `value` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#brightness` |

### SetManualBrightnessSmooth

Set manual brightness specifying the duration over which the
target brightness will be set.

#### Request

| Name | Type |
|---|---|
| `value` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#brightness` |
| `duration` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Duration` |

### WatchAutoBrightness

Requests the current auto-brightness mode.
This call implements the Hanging Get protocol.
Deprecated: 33

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `enabled` | `bool` |

### WatchAutoBrightnessAdjustment

Gets the current auto brightness adjustment.
This call implements the Hanging Get protocol.
Deprecated: 33

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `adjustment` | `float32` |

### WatchCurrentBrightness

Gets the current brightness in the range 0.0 to 1.0.
This result is valid for both manual and auto-brightness modes
and is typically used to show the current brightness on a slider.
This call implements the Hanging Get protocol.
Deprecated: 33

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `value` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#brightness` |

## Reader

*Defined in [fuchsia.ui.brightness/brightness.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/brightness.fidl;l=15)*

Reader provides read-only access to current brightness settings and state.
Added: 33

<br />

### GetMaxAbsoluteBrightness

Gets the maximum supported backlight brightness in nits, if known.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#Reader_GetMaxAbsoluteBrightness_Result` |

### WatchAutoBrightness

Requests the current auto-brightness mode.
This call implements the Hanging Get protocol.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#Reader_WatchAutoBrightness_Result` |

### WatchAutoBrightnessAdjustment

Gets the current auto brightness adjustment.
This call implements the Hanging Get protocol.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#Reader_WatchAutoBrightnessAdjustment_Result` |

### WatchCurrentBrightness

Gets the current brightness in the range 0.0 to 1.0.
This result is valid for both manual and auto-brightness modes
and is typically used to show the current brightness on a slider.
This call implements the Hanging Get protocol.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#Reader_WatchCurrentBrightness_Result` |

## **STRUCTS**

### BrightnessPoint

*Defined in [fuchsia.ui.brightness/brightness.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/brightness.fidl;l=111)*

A tuple representing a point on the auto-brightness curve
Ambient_lux and nits must be positive values.

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `ambient_lux` | `float32` |   | No default |
| `display_nits` | `float32` |   | No default |

### BrightnessTable

*Defined in [fuchsia.ui.brightness/brightness.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/brightness.fidl;l=118)*

A set of points defining the auto-brightness curve.
The ambient_lux values must be monotonically increasing.

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `points` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#BrightnessPoint>:50` |   | No default |

### ColorAdjustment_SetDiscreteColorAdjustment_Response

*Defined in [fuchsia.ui.brightness/color_adjustment.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/color_adjustment.fidl;l=17)*

\<EMPTY\>

### Control_GetMaxAbsoluteBrightness_Response

*Defined in [fuchsia.ui.brightness/brightness.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/brightness.fidl;l=104)*

| Field | Type | Description | Default |
|---|---|---|---|
| `max_brightness` | `float64` |   | No default |

### Reader_GetMaxAbsoluteBrightness_Response

*Defined in [fuchsia.ui.brightness/brightness.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/brightness.fidl;l=37)*

| Field | Type | Description | Default |
|---|---|---|---|
| `max_brightness` | `float64` |   | No default |

### Reader_WatchAutoBrightnessAdjustment_Response

*Defined in [fuchsia.ui.brightness/brightness.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/brightness.fidl;l=32)*

| Field | Type | Description | Default |
|---|---|---|---|
| `adjustment` | `float32` |   | No default |

### Reader_WatchAutoBrightness_Response

*Defined in [fuchsia.ui.brightness/brightness.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/brightness.fidl;l=18)*

| Field | Type | Description | Default |
|---|---|---|---|
| `enabled` | `bool` |   | No default |

### Reader_WatchCurrentBrightness_Response

*Defined in [fuchsia.ui.brightness/brightness.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/brightness.fidl;l=26)*

| Field | Type | Description | Default |
|---|---|---|---|
| `value` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#brightness` |   | No default |

## **TABLES**

### ColorAdjustmentTable

*Defined in [fuchsia.ui.brightness/color_adjustment.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/color_adjustment.fidl;l=32)*

The table for screen color tint adjustments.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `matrix` | `array<float32, 9>` | 3x3 Matrix in row-major form which will be used by root presenter to apply color adjustment. This field may be omitted to disable color adjustment. |

## **UNIONS**

### ColorAdjustment_SetDiscreteColorAdjustment_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.ui.brightness/color_adjustment.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/color_adjustment.fidl;l=17)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#ColorAdjustment_SetDiscreteColorAdjustment_Response` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### Control_GetMaxAbsoluteBrightness_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.ui.brightness/brightness.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/brightness.fidl;l=104)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#Control_GetMaxAbsoluteBrightness_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Status` |   |

<br />

### Reader_GetMaxAbsoluteBrightness_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.ui.brightness/brightness.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/brightness.fidl;l=37)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#Reader_GetMaxAbsoluteBrightness_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Status` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### Reader_WatchAutoBrightnessAdjustment_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.ui.brightness/brightness.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/brightness.fidl;l=32)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#Reader_WatchAutoBrightnessAdjustment_Response` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### Reader_WatchAutoBrightness_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.ui.brightness/brightness.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/brightness.fidl;l=18)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#Reader_WatchAutoBrightness_Response` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### Reader_WatchCurrentBrightness_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.ui.brightness/brightness.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/brightness.fidl;l=26)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.ui.brightness#Reader_WatchCurrentBrightness_Response` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

## **ALIASES**

| Name | Value | Description |
|---|---|---|
| [brightness](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.brightness/brightness.fidl;l=10) | `float32` | A normalized relative brightness adjustment in the range 0.0 (off/minimum) to 1.0 (maximum). |