Re-add the invert_color function

As requested, but it's not used anymore.
develop
Kelvie Wong 2023-02-16 21:43:03 -08:00
parent 3e8d0f0f1e
commit 94ae9973cf
1 changed files with 6 additions and 0 deletions

@ -987,4 +987,10 @@ function FramedScreen:onRenderFrame(dc, rect)
paint_frame(dc,rect,self.frame_style,self.frame_title) paint_frame(dc,rect,self.frame_style,self.frame_title)
end end
-- Inverts the brightness of the color, optionally taking a "bold" parameter,
-- which you should include if you're reading the fg color of a pen.
function invert_color(color, bold)
color = bold and (color + 8) or color
return (color + 8) % 16
end
return _ENV return _ENV