Color picker returns unexpected RGB values

I’m using LVGL on a TFT display with an Arduino. I’m trying to get the RGB values from the color picker widget. The code seems to be working, but it’s returning unexpected values. I can’t seem to figure out what I’m missing or how I’m interpreting the data incorrectly.

lv_color_t selectedColor = lv_colorwheel_get_rgb(ui_colorWheel);
  uint8_t red =;
  uint8_t green =;
  uint8_t blue =;
  Serial.print("Color changed to RGB: ");

When the color wheel selection is basically red (hard to get it exact), the output is:

Color changed to RGB: 31

I would expect something more like 255 for the red value. I know it’s red because later in the code I set the text color to the color wheel selection. What am I missing?

Setting it to yellow-ish, the output is:

Color changed to RGB: 30

I’m not understanding something. Any help is appreciated! Thanks