From owner-freebsd-questions@freebsd.org Wed Dec 30 16:40:23 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31B1AA55C2C for ; Wed, 30 Dec 2015 16:40:23 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF79F1FF5 for ; Wed, 30 Dec 2015 16:40:22 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id tBUGeJWr012325; Thu, 31 Dec 2015 03:40:19 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Thu, 31 Dec 2015 03:40:18 +1100 (EST) From: Ian Smith To: Warren Block cc: Roland Smith , freebsd-questions@freebsd.org Subject: [solved] [OT] Light frequency or wavelength to (eg RGB) colour In-Reply-To: Message-ID: <20151231033050.R8562@sola.nimnet.asn.au> References: <20151231012759.I8562@sola.nimnet.asn.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2015 16:40:23 -0000 On Wed, 30 Dec 2015 08:49:41 -0700, Warren Block wrote: > On Thu, 31 Dec 2015, Ian Smith wrote: > > > does anyone know of a method - preferably a formula - for converting > > known frequencies (or complementarily, their wavelengths) within the > > visible spectrum to its colour rendition in RGB, CMYK or whatever? > > http://stackoverflow.com/questions/1472514/convert-light-frequency-to-rgb > > The first answer supplies as many formulas as anyone might want. Scroll down > and there is a Pascal routine to actually do the conversion. Thanks Warren .. indeed that leads into quite a number of rabbit holes. Thanks also to Roland Smith who sent me offlist (due to OT :) a link to his neat rendition in Python from apparently the same Pascal code: https://github.com/rsmith-nl/wavelength_to_rgb Thanks again folks; much easier than I thought this was going to be. cheers, Ian