---
title: "getColorHex | Mobile sdk | Mobile sdk android | Android"
description: "getColorHex"
---

# getColorHex

suspend fun [getColorHex](https://docs.maptiler.com/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.colorramp/-m-t-color-ramp/get-color-hex/)(value: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html), options: [MTColorRampGetColorOptions](https://docs.maptiler.com/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.colorramp/-m-t-color-ramp-get-color-options/)? = null): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)?

Returns the hex color for a given value.
