Work with color

#include <iostream>
#include <sstream>
using namespace std;

int red = 51;
int green = 255;
int blue = 51;
int alpha = 128;

stringstream streamHex;
streamHex << hex << red << green << blue;
string htmlColor = streamHex.str();
//htmlColor is #33ff33
cout << "style=\"color: #" << htmlColor << "\"";

//with transparency
streamHex << alpha;
htmlColor = "#" + streamHex.str();
//htmlColor is #33ff3380
cout << endl << "htmlColor is " << htmlColor;