Colour of background shape

Discussion in 'Pascal Logic Code Examples' started by Trevor, Apr 14, 2026 at 2:09 AM.

  1. Trevor

    Trevor

    Joined:
    Nov 22, 2018
    Messages:
    550
    Likes Received:
    46
    Location:
    Melbourne Victoria
    Hi All, I need to set the color of a background shape in logic,
    UPDATE...
    I just figured it out, the hex code is inverted so $808000 works correctly

    Now i just need to remove the black rectangle that is being put there when placing the rectangle.

    Like this - SetBrushColor($008080);
    I'm using this web site to select the color...
    https://htmlcolorcodes.com/color-picker/
    But when i try to set the color visually and use that code it doesn't match up.

    It has a very good method to select the color and show the Hex number for it. BUT when i put that number into the logic code it shows a completely different color. I'm after a dark green like in the color selection below but can't seem to select the correct Hex equivalent for it. Other than that, the code works ok, i just set the page timeout to 30 seconds, See code below image...

    Screenshot 2026-04-14 110033.png

    This works great now, thanks to Ashley
    Code:
    once ShowingPage("Calibration Page") then TimerSet(3, 30);
    if   ShowingPage("Calibration Page") then
    Begin
         TextPos(447, 443);
         SetFontSize(20);
     DrawText('', 60 - TimerTime(3));
     Delay(1);
         SetBrushColor($008080);
         Rectangle(500, 475, 550, 440);
    time_counter := time_counter -1;
    
    if time_counter = 0 then ShowPage("Welcome Screen")
    end
    
     
    Trevor, Apr 14, 2026 at 2:09 AM
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.