Date : Thu, 04 Nov 2010 16:30:33 +0000
From : jgh@... (J.G.Harston)
Subject: Programming: Colour names in Sigsumeidsi
Farlie A wrote:
> Sometimes a seeming math operation will be sued when defining a number,
> hence
> (&FF = is hexitiduna = &100-1 )
You've got the roman numbers problem. Is 9 represented as 5+4 or 10-1?
You've shown that 255 is 256-1, but what's 254? 253? 252? At what point
do you go from 128+64+32+16+something to 256-something?
If you have no subtractions, it's easy, it's named bit positions:
MID$("octit",(n%AND128)<>0)+MID$("teti",(n%AND64)<>0)+etc...
just like converting an access byte to an access string.
You haven't given enough examples to see the naming pattern, or
enough rules to define it.
> For example a simple dark green might be :
> ov ga bi rip (Overflow green accumlater 1/2 level.)
full green 2 divide
Why not gaoctit ? green-8-times16
> Whereas an obvious but not staurated green might be :
> ov ga tet rip id bi mul (overflow green accumulator 3/4 level)
full green 4 divide 1 2 multiply
Hmmm. I think I see where you're going here.
> For convenience , ovra is considered equivalent to
> hex it udna ra nul ba nul ga even though ovra is
16 times16 ?? red 0 blue 0 green
I do vaguely remember a challenge to convert RGB values to
colours names years'n'years ago. Pale yellow shading to green. ;)
> PRINT FNTimeToText(4*60 + 30)
Half past 4
> REM ;)
--
J.G.Harston - jgh@...