How do I convert an integer to a javascript color?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an integer which I need to convert to a color in javascript. I am using an MVC model and am trying to replicate a model in a software for a web interface. I have the color in integer format from the database. It needs to be converted to a color in javascript. For example: integers like -12525360, -5952982 I have the code like this : items[x].barStyle = "stroke: Black; fill = Red"; So instead of giving the fill:Red, I need to give it the exact color corresponding to the integer value. This is the code I have written in C#. I need the