[][src]Function colorskill::color_to_string_3

pub fn color_to_string_3(c: (u8, u8, u8), prepend: &str) -> String

Converts an RGB tuple into a comma separated string with added parenthesis.

Takes a prepend argument to add a string to the start.

(0, 0, 0) -> "(0,0,0)" (0, 0, 0) -> "RGB(0,0,0)"

Example

use colorskill::color_to_string_3;
let cs = color_to_string_3((100, 143, 49), "RGB");