Matteo Cavalleri wrote:
> > 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.
That's what I was thinking of, to check if the formula is more or less
OK.
> 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...
Yeah, I don't want to look at every possible color and manually choose
if it's light or dark. It's already difficult enough to make a table
for the values you found with the formula.
> 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.
There are some border cases, such as 50% grey, #808080. Can be
considered light or dark. In these cases I would prefer to keep what we
had before, if there was a value before.
--
hundred-and-one symptoms of being an internet addict:
137. You decide to stay in college for an additional year or two,
just so you can have the free Internet access.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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.