ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Johan Sandblom" <jsandblom@gmail.com>
Subject: randomize a color
Date: Mon, 6 Mar 2006 16:26:35 +0100	[thread overview]
Message-ID: <97a06f070603060726l1a614560t@mail.gmail.com> (raw)

The following produces one red square and two black ones, as opposed
to one red and two randomly perturbed but also red ones I was hoping
for. To my poor understanding this usage seems to comply with that
defined in mp-tool.mp. What am I doing wrong.

Regards, Johan

\setupcolors[state=start]
\definecolor[tilered][r=.425, g=0, b=0]
\definecolor[smudge][r=.1, g=.1, b=.1]

\defineoverlay[page][\useMPgraphic{page}]
\setupbackgrounds[page][background=page]

\startuseMPgraphic{page}
fill unitsquare scaled 2cm withcolor \MPcolor{tilered} ;
fill unitsquare
  scaled 2cm
  shifted (2cm,0cm)
  withcolor \MPcolor{tilered} randomized .1 ;
fill unitsquare
  scaled 2cm
  shifted (4cm,0cm)
  withcolor \MPcolor{tilered} randomized \MPcolor{smudge} ;
\stopuseMPgraphic

\starttext

test

\stoptext
--
Johan Sandblom  N8, MRC, Karolinska sjh
t +46851776108  17176 Stockholm
m +46735521477  Sweden
"What is wanted is not the will to believe, but the
will to find out, which is the exact opposite"
- Bertrand Russell

             reply	other threads:[~2006-03-06 15:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-06 15:26 Johan Sandblom [this message]
2006-03-06 15:47 ` Taco Hoekwater
2006-03-06 16:16   ` Johan Sandblom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=97a06f070603060726l1a614560t@mail.gmail.com \
    --to=jsandblom@gmail.com \
    --cc=johan.sandblom@ki.se \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).