# HslAdjustment.Builder

Artifact: [androidx.media3:media3-effect](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/effect/HslAdjustment.java+class:androidx.media3.effect.HslAdjustment.Builder)

*** ** * ** ***


```
class HslAdjustment.Builder
```

<br />

*** ** * ** ***

A builder for `HslAdjustment` instances.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/effect/HslAdjustment.Builder#Builder()()` Creates a new instance with the default values. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/effect/HslAdjustment.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/effect/HslAdjustment.Builder#adjustHue(float)(hueAdjustmentDegrees: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Rotates the hue of the frame by `hueAdjustmentDegrees`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/effect/HslAdjustment.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/effect/HslAdjustment.Builder#adjustLightness(float)( lightnessAdjustment: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = "-100", to = 100) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Adjusts the lightness of the frame by `lightnessAdjustment`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/effect/HslAdjustment.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/effect/HslAdjustment.Builder#adjustSaturation(float)( saturationAdjustment: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = "-100", to = 100) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Adjusts the saturation of the frame by `saturationAdjustment`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/effect/HslAdjustment!` | `https://developer.android.com/reference/kotlin/androidx/media3/effect/HslAdjustment.Builder#build()()` Creates a new `https://developer.android.com/reference/kotlin/androidx/media3/effect/HslAdjustment` instance. |

## Public constructors

### Builder

```
Builder()
```

Creates a new instance with the default values.

## Public functions

### adjustHue

```
@CanIgnoreReturnValue
fun adjustHue(hueAdjustmentDegrees: Float): HslAdjustment.Builder!
```

Rotates the hue of the frame by `hueAdjustmentDegrees`.

The Hue of the frame is defined in the interval of \[0, 360\] degrees. The actual degrees of hue adjustment applied is `hueAdjustmentDegrees % 360`.

| Parameters |
|---|---|
| `hueAdjustmentDegrees: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The hue adjustment in rotation degrees. The default value is `0`, which means no change is applied. |

### adjustLightness

```
@CanIgnoreReturnValue
fun adjustLightness(
    lightnessAdjustment: @FloatRange(from = "-100", to = 100) Float
): HslAdjustment.Builder!
```

Adjusts the lightness of the frame by `lightnessAdjustment`.

Lightness is defined in the interval of \[0, 100\] where a lightness of `0` is a black frame and a lightness of `100` is a white frame.

| Parameters |
|---|---|
| `lightnessAdjustment: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = "-100", to = 100) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The difference by how much the lightness will be adjusted in either direction. Needs to be in the interval of \[-100, 100\] and the default value is `0`, which means no change is applied. |

### adjustSaturation

```
@CanIgnoreReturnValue
fun adjustSaturation(
    saturationAdjustment: @FloatRange(from = "-100", to = 100) Float
): HslAdjustment.Builder!
```

Adjusts the saturation of the frame by `saturationAdjustment`.

Saturation is defined in the interval of \[0, 100\] where a saturation of `0` will generate a grayscale frame and a saturation of `100` has a maximum separation between the colors.

| Parameters |
|---|---|
| `saturationAdjustment: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = "-100", to = 100) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The difference of how much the saturation will be adjusted in either direction. Needs to be in the interval of \[-100, 100\] and the default value is `0`, which means no change is applied. |

### build

```
fun build(): HslAdjustment!
```

Creates a new `https://developer.android.com/reference/kotlin/androidx/media3/effect/HslAdjustment` instance.