Use the HEX colour options in Blynk.setProperty(V0, "color", "#D3435C");
http://docs.blynk.cc/#blynk-main-operations-change-widget-properties
color is string in HEX format (in the form: #RRGGBB, where RR (red), GG (green) and BB (blue) are hexadecimal values between 00 and FF). For example :
#define BLYNK_GREEN "#23C48E"
#define BLYNK_BLUE "#04C0F8"
#define BLYNK_YELLOW "#ED9D00"
#define BLYNK_RED "#D3435C"
#define BLYNK_DARK_BLUE "#5F7CD8"
I have a bit of code that takes the zeRGBa Widget, and/or three sliders, to customize my own colours and supply both what it looks like as well as corresponding HEX value.
//===== RGB Sliders - BLYNK Functions =====
BLYNK_WRITE(V20) // RED slider.
{
rrr = param.asInt(); // get a RED channel value.
Blynk.virtualWrite(V23, rrr); // Red LED intensity
RGBprocess(); // Goto pin data to HEX conversion funtion.
} // END Blynk Function
BLYNK_WRITE(V21) // GREEN slider.
{
ggg = param.asInt(); // get a GREEN channel value.
Blynk.virtualWrite(V24, ggg); // Green LED intensity
RGBprocess(); // Goto pin data to HEX conversion funtion.
} // END Blynk Function
BLYNK_WRITE(V22) // BLUE slider.
{
bbb = param.asInt(); // get a BLUE channel value.
Blynk.virtualWrite(V25, bbb); // Blue LED intensity
RGBprocess(); // Goto pin data to HEX conversion funtion.
} // END Blynk Function
//===== zeRGBa Widget - BLYNK Function =====
BLYNK_WRITE(V2)
{
rrr = param[0].asInt(); // get a RED channel value.
ggg = param[1].asInt(); // get a GREEN channel value.
bbb = param[2].asInt(); // get a BLUE channel value.
Blynk.virtualWrite(V20, rrr); // Red slider position.
Blynk.virtualWrite(V23, rrr); // Red LED intensity.
Blynk.virtualWrite(V21, ggg); // Green slider position.
Blynk.virtualWrite(V24, ggg); // Green LED intensity.
Blynk.virtualWrite(V22, bbb); // Blue slider position.
Blynk.virtualWrite(V25, bbb); // Blue LED intensity.
Blynk.run();
RGBprocess();
} // END Blynk Function
//===== Physical RGB LED Control and HEX conversion =====
void RGBprocess() // Pin data to HEX conversion funtion.
{
analogWrite(RedP, rrr); // Write to RED RGB pin.
analogWrite(GrnP, ggg); // Write to GREEN RGB pin.
analogWrite(BluP, bbb); // Write to BLUE RGB pin.
String strRED = String(rrr, HEX); // Convert RED DEC to HEX.
if (rrr < 16) {
strRED = String("0" + strRED); // Buffer with 0 if required.
} // END if
String strGRN = String(ggg, HEX); // Convert GREEN DEC to HEX.
if (ggg < 16) {
strGRN = String("0" + strGRN); // Buffer with 0 if required.
} // END if
String strBLU = String(bbb, HEX); // Convert BLUE DEC to HEX.
if (bbb < 16) {
strBLU = String("0" + strBLU); // Buffer with 0 if required.
} // END if
String HEXstring = String("#" + strRED + strGRN + strBLU); // Combine HEX fragments.
Blynk.run();
HEXstring.toUpperCase(); // Change HEX value to all upper case for ease of visuals.
Blynk.setProperty(V8, "color", HEXstring); // Change background colour of HEX Data Label.
Blynk.virtualWrite(V8, HEXstring); // Display HEX data.
Blynk.setProperty(V9, "color", HEXstring); // Send formatted HEX colour to vRGB.
Blynk.virtualWrite(V9, 255); // Activate vRGB.
lcd.print(9, 0, HEXstring);
} // END Blynk Function