> > To see if this is right we would need to make areas with the background > > color, put some white and black text in it, and check which text is best > > readable. >
the formula I choosen should calculate the "perceptual" brightness, i.e. it should take into account human perception and also sRGB color space. As I said i'm no expert in this field, but after documenting a bit and doing a couple of tests I think it should give the expected result. manual tests might be a good idea, but I think we might fall into personal opinions, with people wondering if the tests where made under daylight or in some dark room, with monitor correctly calibrated or with brightness and contrast settings completely blown up... ok i'm exagerating a bit here, but I already wondered how really should be defined the point when a color is no longer "dark". if someone wants to manually test the text/background combinations (and what about grey text instead of just black and white?) I suggest just to test some edge cases and then adjust that "above 50%" you suggested earlier. but maybe discussing the formula might be a better idea than doing the manual test. for the first 16 colors, well, those might even be customized by the user to something completely different, but I've no idea if it is possible to read rgb values runtime on all shells / oses vim run on. but in the best case vim might calculate brigthness runtime for those 16 colors and lookup the pre-calculated, remaining ones. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
