How to achieve transparency?
Hi, I wonder how transparency works in ConTeXt. I expect in the following example the text to be transparent. That's not the case. \definecolor [myI] [r=1, g=.9, b=.7, a=.8] \definecolor [myII] [r=0, g=.9, b=0, a=.8] \setupbodyfont [sans, 36pt] \def\t{Test} \starttext \bf \hbox{\color [myI] {\hbox to 0pt{\t}} \color [myII] {\t}} \stoptext Thanks in advance Marco
On 13-5-2010 4:25, Marco wrote:
Hi,
I wonder how transparency works in ConTeXt. I expect in the following example the text to be transparent. That's not the case.
\definecolor [myI] [r=1, g=.9, b=.7, a=.8] \definecolor [myII] [r=0, g=.9, b=0, a=.8]
t=.5, a=1 (a is the method)
\setupbodyfont [sans, 36pt] \def\t{Test} \starttext \bf \hbox{\color [myI] {\hbox to 0pt{\t}} \color [myII] {\t}} \stoptext
Thanks in advance Marco
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
I wonder how transparency works in ConTeXt. I expect in the following example the text to be transparent. That's not the case.
\definecolor [myI] [r=1, g=.9, b=.7, a=.8] \definecolor [myII] [r=0, g=.9, b=0, a=.8]
t=.5, a=1 (a is the method) Oh! I assumed »a« stands for »alpha«. Thanks, Hans. Works as expected now.
Marco
On 13-5-2010 7:13, Marco wrote:
I wonder how transparency works in ConTeXt. I expect in the following example the text to be transparent. That's not the case.
\definecolor [myI] [r=1, g=.9, b=.7, a=.8] \definecolor [myII] [r=0, g=.9, b=0, a=.8]
t=.5, a=1 (a is the method) Oh! I assumed »a« stands for »alpha«. Thanks, Hans. Works as expected now.
r = red channel
g = green channel
b = blue channel
c = cyan channel
m = magenta channel
y = yellow channel
k = black channel
h = hue or hexadecimal
s = saturation
v = value (or so)
h = hex (i'll add x for hex as well)
a = alternative
t = transparency factor
s = gray value
p = spotcolor percentage
e = spotcolorname
On Thu, 13 May 2010 22:57:50 +0200, Hans Hagen
On 13-5-2010 7:13, Marco wrote:
I wonder how transparency works in ConTeXt. I expect in the following example the text to be transparent. That's not the case.
\definecolor [myI] [r=1, g=.9, b=.7, a=.8] \definecolor [myII] [r=0, g=.9, b=0, a=.8]
t=.5, a=1 (a is the method) Oh! I assumed »a« stands for »alpha«. Thanks, Hans. Works as expected now.
r = red channel g = green channel b = blue channel
c = cyan channel m = magenta channel y = yellow channel k = black channel
h = hue or hexadecimal s = saturation v = value (or so)
h = hex (i'll add x for hex as well)
a = alternative t = transparency factor
s = gray value
p = spotcolor percentage e = spotcolorname
= duotone 1 = duotone 2 that's about it
Hans Thanks for the explanation.
Marco
Am 2010-05-13 um 22:57 schrieb Hans Hagen:
r = red channel g = green channel b = blue channel
c = cyan channel m = magenta channel y = yellow channel k = black channel
h = hue or hexadecimal s = saturation v = value (or so)
h = hex (i'll add x for hex as well)
a = alternative t = transparency factor
s = gray value
p = spotcolor percentage e = spotcolorname
= duotone 1 = duotone 2 that's about it
I wikified that: http://wiki.contextgarden.net/Reference/en/definecolor But how's it possible that h and s have two meanings? Does HSB mode work at all? (Didn't try.) What means "alternative"? (So far I only know that it should be 1 for transparency.) Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
On 14-5-2010 3:16, Henning Hraban Ramm wrote:
Am 2010-05-13 um 22:57 schrieb Hans Hagen:
r = red channel g = green channel b = blue channel
c = cyan channel m = magenta channel y = yellow channel k = black channel
h = hue or hexadecimal s = saturation v = value (or so)
h = hex (i'll add x for hex as well)
a = alternative t = transparency factor
s = gray value
p = spotcolor percentage e = spotcolorname
= duotone 1 = duotone 2 that's about it
I wikified that: http://wiki.contextgarden.net/Reference/en/definecolor
But how's it possible that h and s have two meanings? Does HSB mode work at all? (Didn't try.)
hsv should work (it's the 'v' that triggers the meaning)
What means "alternative"? (So far I only know that it should be 1 for transparency.)
\definetransparency [none] [0] \definetransparency [normal] [1] \definetransparency [multiply] [2] \definetransparency [screen] [3] \definetransparency [overlay] [4] \definetransparency [softlight] [5] \definetransparency [hardlight] [6] \definetransparency [colordodge] [7] \definetransparency [colorburn] [8] \definetransparency [darken] [9] \definetransparency [lighten] [10] \definetransparency [difference] [11] \definetransparency [exclusion] [12] -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Henning Hraban Ramm
-
Marco