# SolidColor

Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/Brush.kt+class:androidx.compose.ui.graphics.SolidColor) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  class SolidColor : Brush, Interpolatable
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.compose.ui.graphics.Brush](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush) ||
|   | ↳ | [androidx.compose.ui.graphics.SolidColor](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/SolidColor) |

*** ** * ** ***

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/SolidColor#SolidColor(androidx.compose.ui.graphics.Color)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)` | Cmn |

| ### Public functions |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/SolidColor#applyTo(androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.Paint,kotlin.Float)(size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, p: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint, alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` | Cmn |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/SolidColor#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/SolidColor#hashCode()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/SolidColor#lerp(kotlin.Any,kotlin.Float)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?, t: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` This method is defined such that a value of `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)` being 1.0 means that the interpolation has finished, meaning that this method should return either `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)` (or something equivalent to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)`), 0.0 meaning that the interpolation has not started, returning `this` (or something equivalent to `this`), and values in between meaning that the interpolation is at the relevant point on the timeline between `this` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)`. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/SolidColor#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/SolidColor#value()` | Cmn |

| ### Inherited properties |
|---|
| From [androidx.compose.ui.graphics.Brush](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush) |---|---|---| | `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush#intrinsicSize()` Return the intrinsic size of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush`. | Cmn | |

## Public constructors

### SolidColor

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0)

```
SolidColor(value: Color)
```

## Public functions

### applyTo

Cmn

```
open fun applyTo(size: Size, p: Paint, alpha: Float): Unit
```

### equals

Cmn

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

Cmn

```
open fun hashCode(): Int
```

### lerp

Cmn

```
open fun lerp(other: Any?, t: Float): Any?
```

This method is defined such that a value of `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)` being 1.0 means that the interpolation has finished, meaning that this method should return either `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)` (or something equivalent to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)`), 0.0 meaning that the interpolation has not started, returning `this` (or something equivalent to `this`), and values in between meaning that the interpolation is at the relevant point on the timeline between `this` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)`. The interpolation can be extrapolated beyond 0.0 and 1.0, so negative values and values greater than 1.0 are valid.

Note that the type of `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)` may not be the same as the type of `this`, however if the implementation knows how to losslessly convert from one type to another, the conversion can be made in order to optimistically provide a valid interpolation.

If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)` is `null`, this can be interpreted as interpolating between "nothing" or, "no effect", into whatever the value of `this` is. In this case, if it is possible to construct a version of this type that is visually or semantically equivalent to "no effect", then it might make sense to return an interpolation between that value and `this`.

If there is no known way to interpolate between the two values, the implementation should return null.

| Parameters |
|---|---|
| `other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | The other object to be intorpolated with this one. |
| `t: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The position on the timeline. This is usually between 0 and 1, but it is valid for it to be outside of this range. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | The interpolated object. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable` | #lerp |

### toString

Cmn

```
open fun toString(): String
```

## Public properties

### value

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val value: Color
```