[Vala] Convert RGB color value to HEX



Hi. I need to get color value in HEX in my vala program.

Basically, I get a color expression like this,

rgb(red, green, blue) or rgba(red, green, blue, alpha)

But I need to convert it into a format #rrggbb

I cannot seem to understand how to do it.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]