package Ġdev . tm apps . kon nection . sample . ui . theme Ċ Ċ import Ġandroidx . compose . material . Colors Ċ import Ġandroidx . compose . material . Surface Ċ import Ġandroidx . compose . runtime . Composable Ċ import Ġandroidx . compose . ui . graphics . Color Ċ import Ġandroidx . compose . ui . graphics . composite Over Ċ import Ġandroidx . compose . ui . unit . Dp Ċ import Ġkotlin . math . ln Ċ Ċ val Ġgray 2 0 0 Ġ= ĠColor ( 0 xff eeee ee ) Ċ val Ġgray 5 0 0 Ġ= ĠColor ( 0 xff 9 e 9 e 9 e ) Ċ val Ġgray 6 0 0 Ġ= ĠColor ( 0 xff 7 5 7 5 7 5 ) Ċ val Ġgray 7 0 0 Ġ= ĠColor ( 0 xff 6 1 6 1 6 1 ) Ċ val Ġgray Dark Primary Ġ= ĠColor ( 0 xff 4 f 5 b 6 6 ) Ċ Ċ /** Ċ Ġ* ĠReturn Ġthe Ġfully Ġopaque Ġcolor Ġthat Ġresults Ġfrom Ġcomp osit ing Ġ[ on Surface ] Ġat op Ġ[ surface ] Ġwith Ġthe Ċ Ġ* Ġgiven Ġ[ alpha ]. ĠUseful Ġfor Ġsituations Ġwhere Ġsemi - transparent Ġcolors Ġare Ġun des irable . Ċ Ġ*/ Ċ @ Composable Ċ fun ĠColors . comp os ited On Surface ( alpha : ĠFloat ): ĠColor Ġ{ ĊĠĠĠ Ġreturn Ġon Surface . copy ( alpha Ġ= Ġalpha ). composite Over ( surface ) Ċ } Ċ Ċ /** Ċ Ġ* ĠE levation Ġoverlay Ġlogic Ġcopied Ġfrom Ġ[ Surface ] ĠâĢĶ Ġhttps :// issue tracker . google . com / 1 5 5 1 8 1 6 0 1 Ċ Ġ*/ Ċ fun ĠColors . elev ated Surface ( elevation : ĠD p ): ĠColor Ġ{ ĊĠĠĠ Ġif Ġ( is Light ) Ġreturn Ġsurface ĊĠĠĠ Ġval Ġforeground Ġ= Ġcalculate Foreground ( elevation ) ĊĠĠĠ Ġreturn Ġforeground . composite Over ( surface ) Ċ } Ċ Ċ private Ġfun Ġcalculate Foreground ( elevation : ĠD p ): ĠColor Ġ{ ĊĠĠĠ Ġval Ġalpha Ġ= Ġ(( 4 . 5 f Ġ* Ġln ( elevation . value Ġ+ Ġ 1 )) Ġ+ Ġ 2 f ) Ġ/ Ġ 1 0 0 f ĊĠĠĠ Ġreturn ĠColor . White . copy ( alpha Ġ= Ġalpha ) Ċ } Ċ