Hi,
i entered a Pharo version to this Code Golf contest:
http://codegolf.stackexchange.com/a/32535/26615
Given three number values - being the Red, Green, and Blue elements of a
colour (eight bits per channel, 0 to 255) - your program must output the
name of the given colour.“
My answer is:
|
2014-06-25 18:53 GMT+02:00 MartinW w...@fastmail.fm:
Hi,
i entered a Pharo version to this Code Golf contest:
http://codegolf.stackexchange.com/a/32535/26615
Given three number values - being the Red, Green, and Blue elements of a
colour (eight bits per channel, 0 to 255) - your program
Nicolai Hess wrote
Color classr: r g: g b: b
Return a color with the given r, g, and b components in the range
[0.0..1.0].
:-) Range is [0..1] not [0..255]
Oh, thank you, how embarassing. I correct it to:
color := Color r: 255 g: 0 b: 0 range: 255.
Still the problem remains the same. I
MartinW wrote
Nicolai Hess wrote
Color classr: r g: g b: b
Return a color with the given r, g, and b components in the range
[0.0..1.0].
:-) Range is [0..1] not [0..255]
Oh, thank you, how embarassing. I correct it to:
color := Color r: 255 g: 0 b: 0 range: 255.
Still the problem
MartinW wrote
MartinW wrote
Nicolai Hess wrote
Color classr: r g: g b: b
Return a color with the given r, g, and b components in the range
[0.0..1.0].
:-) Range is [0..1] not [0..255]
Oh, thank you, how embarassing. I correct it to:
color := Color r: 255 g: 0 b: 0 range: 255.