[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RGB to HSL conversion

From: Thomas Dickey
Subject: Re: RGB to HSL conversion
Date: Thu, 10 Jan 2019 19:45:52 -0500
User-agent: Mutt/1.5.23 (2014-03-12)

On Thu, Jan 10, 2019 at 10:38:54AM -0600, Bryan Christ wrote:
> I've been looking at a lot of code samples for converting RGB to HSL.  It
> looks like most examples assume an RGB range of 0 - 255 whereas ncurses
> assumes a range of 0 - 1000.  Would it be reasonable to simply take the
> ncurses RGB values and multiply them by 0.25 to use them elsewhere?

If you're assuming the number of bits per color is 8, sure.

That range 0 to 1000 doesn't require that curses assumes anything
about the device.

Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]