Function terminal_light::luma
source · [−]Expand description
Try to return the “luma” value of the terminal’s background, characterizing the “light” of the color, going from 0 (black) to 1 (white).
You can say a terminal is “dark” when the luma is below 0.2 and “light” when it’s over 0.9. If you need to choose a pivot between “rather dark” and “rather light” then 0.6 should do.