From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/74224 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Colour manipulation Date: Sun, 21 Nov 2010 20:02:33 +0100 Organization: Programmerer Ingebrigtsen Message-ID: References: <87pquvldcs.fsf@lifelogs.com> <87oc9yp21w.fsf@lifelogs.com> <87lj4pmgu7.fsf@keller.adm.naquadah.org> <87oc9ihjbk.fsf@keller.adm.naquadah.org> <8739quh5gk.fsf@keller.adm.naquadah.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1290366188 7271 80.91.229.12 (21 Nov 2010 19:03:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 21 Nov 2010 19:03:08 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M22589@lists.math.uh.edu Sun Nov 21 20:02:58 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PKFBh-0007Oa-9W for ding-account@gmane.org; Sun, 21 Nov 2010 20:02:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PKFBa-0006Uj-0r; Sun, 21 Nov 2010 13:02:50 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PKFBY-0006UZ-RU for ding@lists.math.uh.edu; Sun, 21 Nov 2010 13:02:48 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PKFBU-00061G-ET for ding@lists.math.uh.edu; Sun, 21 Nov 2010 13:02:48 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PKFBT-0004dj-00 for ; Sun, 21 Nov 2010 20:02:43 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PKFBT-0007MU-0k for ding@gnus.org; Sun, 21 Nov 2010 20:02:43 +0100 Original-Received: from cm-84.215.34.171.getinternet.no ([84.215.34.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Nov 2010 20:02:43 +0100 Original-Received: from larsi by cm-84.215.34.171.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Nov 2010 20:02:43 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 32 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.34.171.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEWUj5gCAgSzrbVXVV4b Gx+Df4igaHiuAAACTklEQVQ4jW3TS5LjIAwGYBUOB6DM7ClS3scj2IdC2RNj3f8q82On0+mpZpXw WeiBTe5Y4rzzmTtzU2u5hU4nOC/l3olUAdQpvsGJbzZQs6pKSlE/IIdGjSDW2kgH+OK8r7oQtWYJ i6M5AbmlZhoQYlweHNsBM4tIbeMcEwFzZaF1RHQINwqAQJZ9TYVkgDJL1jwyo5XkhStVcUUY/xh1 TgOqFIdwEY/zK3NlNIeFZ6RopFLECZeELPU2IPfkSwZgg1VkHoWNmKYsJQeUWwBJfJG9ouvWNKUR gQcl2wsyVWsxwZElFaZxlM90WWu9YbhjvtoPQIBXAGdMyVpCjs4rwEkSQMGoDIUxQe15wKhp573M R0Qb0nWtSr5mfQoAMwzHPtKswiQ4/Ol39wAYY1/gKo2JpLy7uRl6LQuYURXXpBfnxzE4C6O0ZwR3 dHYV2cYdxaC4K+qAyrba6eLcYwso13bOqsk9ELHULVxWtD8Com23RsnfDzAI8R2vQSBANjHxDQ1e ATYfEE1UgNmPzq81LkvFiHFQiNcbmy2dMNPU3bhmiiEQ4/LPiKVOfXKYejAjexhQLfl5qhNP7ijq WB3gp6Nzu0+Cl9acsDTdXScvfV54yTG89vGDLm7C2Nl31B0w2Bfh1sfYpQtesQ0QXiHM6wzwVjDT LehXACLWOZHz1mnvf+N7Py559S/Y6RMsr3/2L9jiuw9AeTzxig5onzDV9b5+w/dKvObyG6BcPSHv Lf4E636BgG9qGqD/wYLP7g3bT3jsA7pLu/mAK/Pt6f4BPO+9GNvCnP0AAAAASUVORK5CYII= Mail-Copies-To: never X-Now-Playing: Akira Rabelais's _Caduceus_: "then the substanceless blue" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:F4h5exAcbxoO8h/ipcHgYPKd8KQ= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:74224 Archived-At: Julien Danjou writes: >> To bikeshed a bit, color.el is kinda very general name. Perhaps >> color-calc.el or something would be better... color-lab.el would be punnier. >> My use case would be that I have a set background colour (eg., "black"), >> and then the CSS says "text-color: blue". I then want to modify the >> latter to be a colour that is visible enough to read. How would I do >> that? > > Hum the easiest way would be to convert RGB to Lab and then change L, a > or b. > > To have a good understanding of how colors are represented in Lab, just > take a look at the Wikipedia[1] page, the image are pretty explicit. I'm always interested in avoiding learning new things. :-) > There's no easy way to know by how much you should increase L, a or b, > or what would be the best choice. > > FWIW L is always between 0 and 100, and there's a good chance that just > changing it to 0 or 100 (depending on the other color L value) would > give for sure a good result. One has to try. It's all Greek to me... -- (domestic pets only, the antidote for overdose, milk.) larsi@gnus.org * Lars Magne Ingebrigtsen