Path: csiph.com!.POSTED.208-71-239-109.cust.centrio.cz!not-for-mail From: Cezary Tomczyk Newsgroups: comp.lang.javascript Subject: Re: Finding a real background color of an element Date: Tue, 4 Sep 2018 18:52:04 +0200 Organization: csiph.com Internet News Service Message-ID: References: <1ubqz126avwqd$.1ba1f0ac07trn$.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 4 Sep 2018 16:52:05 -0000 (UTC) Injection-Info: csiph.com; posting-host="208-71-239-109.cust.centrio.cz:109.239.71.208"; logging-data="2897"; mail-complaints-to="admin@kev009.com" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 In-Reply-To: Content-Language: en-US Xref: csiph.com comp.lang.javascript:35558 On 02/09/2018 21:40, Michael Haufe (TNO) wrote: > Cezary Tomczyk wrote: >> I do calculate a contrast ratio and for that purpose I need background >> and foreground color. Currently, if I can't determine a background color >> for a particular element then I do skip contrast ratio calculation. >> >> I am working on https://www.aslint.org/. The code is not public yet, but >> I have a plan to publish it. > > Did you attempt any of the canvas + SVG based solutions yet? The method I mentioned in my last post has been implemented as a library: > > I haven't got a chance to check it, but Julio's right - missing defined background color is an issue anyway that should be raised. -- Cezary Tomczyk http://www.ctomczyk.pl/