Hi, At a local workshop we're working with the Pharo tutorial and we use the classical example of RGB colors for keyword messages. When we use the Prof Stef's example we get the following screenshot: While executing the same color in Wolfram Alpha gives us: As you can see, both colors are pretty different. Which is the reason behind the differences in the color that is shown in Pharo and the one in WA? Cheers, Offray
As far as I remember, Color>>#r:g:b: expects 3 numbers between 0 and 1, instead of integers from 0 to 255. Inspecting a color using the fractions proposed by Wolframalpha gives you the expected color: Color r: 0.06 g: 0.39 b: 0.39 Cheers, Alejandro
On Sep 28, 2015, at 11:07 PM, Offray Vladimir Luna Cárdenas <offray@riseup.net> wrote:
Hi,
At a local workshop we're working with the Pharo tutorial and we use the classical example of RGB colors for keyword messages. When we use the Prof Stef's example we get the following screenshot:
<djjjjajg..png>
While executing the same color in Wolfram Alpha gives us:
<dgcdicbd..png>
As you can see, both colors are pretty different. Which is the reason behind the differences in the color that is shown in Pharo and the one in WA?
Cheers,
Offray
Thanks Alejandro. Mistery solved :-) On 28/09/15 22:02, Alejandro Infante wrote:
As far as I remember, Color>>#r:g:b: expects 3 numbers between 0 and 1, instead of integers from 0 to 255.
Inspecting a color using the fractions proposed by Wolframalpha gives you the expected color: Color r: 0.06 g: 0.39 b: 0.39
Cheers, Alejandro
On Sep 28, 2015, at 11:07 PM, Offray Vladimir Luna Cárdenas <offray@riseup.net> wrote:
Hi,
At a local workshop we're working with the Pharo tutorial and we use the classical example of RGB colors for keyword messages. When we use the Prof Stef's example we get the following screenshot:
<djjjjajg..png>
While executing the same color in Wolfram Alpha gives us:
<dgcdicbd..png>
As you can see, both colors are pretty different. Which is the reason behind the differences in the color that is shown in Pharo and the one in WA?
Cheers,
Offray
This must be a common user error. Should the method actually error when passed a number > 1 ? cheers -ben On Tue, Sep 29, 2015 at 11:02 AM, Alejandro Infante <alejandroinfante91@gmail.com> wrote:
As far as I remember, Color>>#r:g:b: expects 3 numbers between 0 and 1, instead of integers from 0 to 255.
Inspecting a color using the fractions proposed by Wolframalpha gives you the expected color: Color r: 0.06 g: 0.39 b: 0.39
Cheers, Alejandro
On Sep 28, 2015, at 11:07 PM, Offray Vladimir Luna Cárdenas <offray@riseup.net> wrote:
Hi,
At a local workshop we're working with the Pharo tutorial and we use the classical example of RGB colors for keyword messages. When we use the Prof Stef's example we get the following screenshot:
<djjjjajg..png>
While executing the same color in Wolfram Alpha gives us:
<dgcdicbd..png>
As you can see, both colors are pretty different. Which is the reason behind the differences in the color that is shown in Pharo and the one in WA?
Cheers,
Offray
participants (4)
-
Alejandro Infante -
Ben Coman -
Esteban A. Maringolo -
Offray Vladimir Luna Cárdenas