<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Thu, 04 Nov 2010 15:49:03 +0100
From   : rick@... (Rick Murray)
Subject: Programming: Colour names in Sigsumeidsi

On 04/11/2010 12:56, Farlie A wrote:

> Wheras an obvious but not staurated green might be :
>   ovgatetripidbimul (overflow green accumulator 3/4 level)

Is there any specific reason why the language construct takes something 
fairly simple (this much red, this much green, this much blue) and 
complicates the hell out of it?


> The programming exercise is to convert between RGB(or HTML colors) and
> the 'simplest' possible Sigsumeidsi color name ,

Mmmm, I'm wondering how tricky it would be to specify the pastel colours 
(azure, that sort of thing).


I'd be inclined to maintain a look-up table of the "common" colours 
(there'd only be 8-32 depending on what you think of as common).

For the rest, work with divisions of 256, like half green would be:
     128th of 256.
Can this reduce?
     64th of 128.
Can this reduce?
     32th of 64th.
And so on until you arrive at the simplest arrangement. This is missing 
out a lot, but since I'm numerically dyslexic (and getting ready for 
work once I finish my sukiyaki), you'll have to make do with this for 
now. ;-)


> I am also aware of one flaw with the above if anyone wants to point it out...

Computer video cards understand levels of 0-255, HTML colours (etc) 
understand levels of 0-255, this seems an unnecessarily complicated 
step? <grin>


Best wishes,

Rick.

-- 
Rick Murray, eeePC901 & ADSL WiFI'd into it, all ETLAs!
BBC B: DNFS, 2 x 5.25" floppies, EPROM prog, Acorn TTX
E01S FileStore, A3000/A5000/RiscPC/various PCs/blahblah...
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>