---
updatedAt: 2026-06-12T07:25:06.000Z
agentTools:
  siteIndex: https://developer.bitmovin.com/llms.txt
  projectIndex: https://developer.bitmovin.com/playback/llms.txt
---

# CaptionStyle

com.bitmovin.player

# CaptionStyle

data class CaptionStyle(val foregroundColor: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), val backgroundColor: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), val windowColor: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), val edgeType: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), val edgeColor: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), val typeface: [Typeface](https://developer.android.com/reference/kotlin/android/graphics/Typeface.html)?)

Styling options for subtitle and caption rendering.

This type mirrors [CaptionStyleCompat](https://developer.android.com/reference/kotlin/androidx/media3/ui/CaptionStyleCompat.html) and is used with [SubtitleRendererView.setStyle](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-subtitle-renderer-view).

## Constructors

|              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CaptionStyle | constructor(foregroundColor: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), backgroundColor: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), windowColor: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), edgeType: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), edgeColor: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), typeface: [Typeface](https://developer.android.com/reference/kotlin/android/graphics/Typeface.html)?) |

## Properties

| Name            | Summary                                                                                                                                                                                                                                                                     |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| backgroundColor | val backgroundColor: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)<br>Background color behind the rendered caption text as an Android ARGB color int.                                                                                         |
| edgeColor       | val edgeColor: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)<br>Color used for the configured edgeType as an Android ARGB color int.                                                                                                          |
| edgeType        | val edgeType: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)<br>Edge style applied to caption text.                                                                                                                                            |
| foregroundColor | val foregroundColor: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)<br>Text color as an Android ARGB color int, for example a value from [android.graphics.Color](https://developer.android.com/reference/kotlin/android/graphics/Color.html). |
| typeface        | val typeface: [Typeface](https://developer.android.com/reference/kotlin/android/graphics/Typeface.html)?<br>Typeface used for caption text, or `null` to use the default typeface.                                                                                          |
| windowColor     | val windowColor: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)<br>Background color of the cue window as an Android ARGB color int.                                                                                                            |