[][src]Function colorskill::color_to_string_4

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

Converts an RGB tuple into a comma separated string with added parenthesis and spaces after commas.

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_4;
let cs = color_to_string_4((100, 143, 49), "RGB");