Colors on V5 Brain

I was doing some coding (on VCS sadly) and I was wondering if there is a way to customize colors on the V5 brain screen. VCS will only let me do certain colors and I was really hoping for a tan color. Is there any way to get that?

The color type has a constructor that takes RGB colour values. For example, if you want a light grey, you can do Brain.Screen.setFillColor({0xDD, 0xDD, 0xDD}).

1 Like

Lots of ways to create colors.

int main() {
    // using one of the named colors
    Brain.Screen.setFillColor( red );
    Brain.Screen.drawRectangle( 10, 10, 30, 40 );
    
    // using web color
    Brain.Screen.setFillColor( "#008000" );
    Brain.Screen.drawRectangle( 50, 10, 30, 40 );

    // using hue    
    Brain.Screen.setFillColor( 120.0 );
    Brain.Screen.drawRectangle( 90, 10, 30, 40 );
    
    // as color instance
    vex::color c = vex::color( 0, 30, 200 );
    Brain.Screen.setFillColor( c );
    Brain.Screen.drawRectangle( 130, 10, 30, 40 );
    
    // a different way to name color
    vex::color tan;
    tan.web("#D2B48C");
    Brain.Screen.setFillColor( tan  );
    Brain.Screen.drawRectangle( 170, 10, 30, 40 );
    
    while(1) {
        // Allow other tasks to run
        this_thread::sleep_for(10);
    }
}
1 Like

So, rose is rose, no matter what colorspace you use?

Who knows what colorspace the V5 LCD is using, pretty sure it’s not sRGB, what you see is what you get.

1 Like