Xamarin.Forms.Color to hex value

后端 未结 4 653
广开言路
广开言路 2020-12-15 19:49

I have a Xamarin.Forms.Color and I want to convert it to a \'hex value\'.

So far, I haven\'t found a solution to my problem.

My code is as follows:



        
4条回答
  •  春和景丽
    2020-12-15 20:34

    This will give you the hex color in the format #{Alpha}{R}{G}{B}.

    For example #FFFF0000 for Red.

    color.ToHex();
    

提交回复
热议问题