How to print a formatted number with colors?

Is there a way to use @printf with colors or print_with_color with format?

Pass the result of @sprintf to print_with_color?

Indeed! Thank you!