Colors palette
You can change the color palette in two ways:
- The complete implementation of the interface
com.devexperts.dxcharts.lib.ui.theme.DxChartsColors
.
val colors = DxChartsColors(mainChartBg = Color(/* ... */),mainChartValueText = Color(/* ... */),/*Every parameter initialization*/)DxChartsTheme(colors = colors) {/* content */}
- Adjusting the parameters of the default color palette. It's not mandatory to modify all parameters.
val colors = darkPalette().copy(iconActiveBg = Color(/* ... */),separator = Color(/* ... */),//...)DxChartsTheme(colors = colors) {/* content */}
All colors used in library you can find here
Creating a color is done using the androidx.compose.ui.graphics.Color
class:
- Using constants:
Color.White
,Color.Black
,Color.Cyan
- Creating RGB, SRGB, XYZ, LAB colors using the Color class constructor:
Color("0xAABBCCDD")
orColor(alpha = 0xAA, red = 0xBB, green = 0xCC, blue = 0xDD)
or using another method.