frameColor doesn't match Docs

While in fact a listbox does have a dark border (in lite mode) and a light border in darkmode… If I apply this in a custom canvas control, the color is ALWAYS light

not seeing that here
I just dropped a canvas on a window layout plus a text area and listbox
I made the text area the first control in the tab order so the listbox doesnt get focus
in the canvas paint event I simply put

 g.forecolor = framecolor
 g.fillrect 0,0,g.width,g.height

the color that canvas is filled with switches in light and dark modes as I expect

When are you trying to use the color ? in the paint event or somewhere else ?

the last lines of my PAINT event

If border Then 
  // g.ForeColor=FrameColor - doesn't work properly for darkmode
  If Not IsDarkMode Then 
  End If
  g.drawrect 0,0,g.Width,g.Height
End If

This is my “band-aid”