DVUI

toHexString

Returns a hex color string in the format "#rrggbb"

Parameters

#
self:Color
Color

Source

Implementation

#
pub fn toHexString(self: Color) HexString {
    var result: HexString = undefined;
    _ = std.fmt.bufPrint(&result, "#{x:0>2}{x:0>2}{x:0>2}", .{ self.r, self.g, self.b }) catch unreachable;
    return result;
}