Button code help

In this code, I am trying to modify the color of the buttons. I have colors in hex form but when I change the colors for example: “0xE00000” to the hex color that I want (#1D1F3F), I get an error. How can I make it so that I can add the buttons color and outline color to the array formed? I just want to use my hex colors where ex. “0xE00000, 0x0000E0” are. Thanks!

  typedef struct _button {
  int    xpos;
  int    ypos;
  int    width;
  int    height;
  bool   state;
  vex::color offColor;
  vex::color onColor;
  const char *label;
} button;
// Button array definitions for each software button. The purpose of each button data structure
// is defined above.  The array size can be extended, so you can have as many buttons as you
// wish as long as it fits.
button buttons[] = {
  {   30,  30, 60, 60,  false, 0xE00000, 0x0000E0},
  {  150,  30, 60, 60,  false, 0x34b334, 0xC0C0C0},
  {  270,  30, 60, 60,  false, 0x404040, 0xC0C0C0},
  {  390,  30, 60, 60,  false, 0x404040, 0xC0C0C0},
  {   30, 150, 60, 60,  false, 0x404040, 0xC0C0C0},
  {  150, 150, 60, 60,  false, 0x404040, 0xC0C0C0},
  {  270, 150, 60, 60,  false, 0x404040, 0xC0C0C0},
  {  390, 150, 60, 60,  false, 0x404040, 0xC0C0C0}
};

Works for me…

Solution is to add “0x” before the color you want to display so “1D1F3F” should appear as “0x1D1F3F” so the compiler knows it should be interpreted as a hexadecimal number. The reason it is six digits, is that color is a three byte value, where each byte represents one component of the color in RGB space. So first byte is the Red component of the color, second byte is the Green component of the color and third byte is the Blue component. From a color perception, the human eye is more sensitive to green component in the image.

More info here for turning color images into grayscale https://en.wikipedia.org/wiki/Grayscale