Empty graphics when using Hue in bitmap?

Why the following code

Graphics[Raster[{{Hue[1], Hue[1/3]}, {Hue[2/3], Hue[1/6]}}]]

      

no output is produced? In Mathematica <6 RasterArray was able to handle this and produced the same output as

Graphics[Raster[{{{1, 0, 0}, {0, 1, 0}}, {{0, 0, 1}, {1, 1, 0}}}]]

      

+2


a source to share


1 answer


The documentation Raster

states that its arguments are not graphics directives (e.g. Hue, RGBColor), but rather numbers - gray level (single number), RGB values ​​(three numbers), RGBalpha values ​​(four numbers), or gray alpha values ​​(two numbers) ... However, it provides the ability to specify a color function instead, for example:

Graphics[Raster[{{0, 0.2, 0.4}, {0.6, 0.8, 1}}, ColorFunction -> Hue]]

      



(straight from documentation for v6)

+4


a source







All Articles