Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^2: Ordering Colours Problem

by choroba (Archbishop)
on Mar 06, 2021 at 22:54 UTC ( #11129225=note: print w/replies, xml ) Need Help??

in reply to Re: Ordering Colours Problem
in thread Ordering Colours Problem

> Black appearing second after red is puzzling, though

If you run my code several times, you'll see the black and red are sometimes swapped. That's because black is in fact the darkest possible red :-)

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^3: Ordering Colours Problem
by vr (Curate) on Mar 07, 2021 at 07:53 UTC

    Oh, I see: sort is performed on keys of derived hash, not original list. Hence the unstable result.

Re^3: Ordering Colours Problem
by LanX (Sage) on Mar 07, 2021 at 01:13 UTC
    In the page you linked to one finds the HLS model visualized as a cylinder = 2d-circle x height. (A round cake )

    While height is (L)umidity, does the distance to the circles center represent (S)aturation.

    The axis of that cylinder, the circles center (S=0) is the gray-scale, with black at the bottom (L=0) and white at the top (L=1) and belongs to all "colors" of that wheel.

    I.e one point on the wheel represents all colors in the rectangle formed by axis and angle. (The side of a cakepiece)


    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11129225]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2022-09-30 09:21 GMT
Find Nodes?
    Voting Booth?
    I prefer my indexes to start at:

    Results (125 votes). Check out past polls.