# How to make columns different colors in an ArrayPlot?

Consider an ArrayPlot of some arbitrary matrix with values between zero and one.

matrix = {
{0.1, 0.1, 0.1}
, {0.3, 0.3, 0.3}
, {0.5, 0.5, 0.5}
};


I want to plot this matrix as an ArrayPlot but with each Column as a different color.

Using ColorFunction and Lighter I can make all the Columns the same color.

matrix = {{0.1, 0.1, 0.1}, {0.3, 0.3, 0.3}, {0.5, 0.5, 0.5}};
ArrayPlot[matrix, ColorFunction -> (Lighter[Red, #] &)] # Question:

How do I make each Column of the ArrayPlot shades of a different color?

For instance, I would like to make the cells of the first column shades of blue.

 MatrixPlot[MapIndexed[Lighter[ColorData[#2[]], #] &, matrix, {2}]] MatrixPlot[MapIndexed[Lighter[{Red, Blue, Green}[[#2[]]], #] &, matrix, {2}]] MatrixPlot[MapIndexed[
Lighter[ColorData["Rainbow"][(#2[] - 1)/(Dimensions[matrix][] - 1)], #] &,
matrix, {2}]] You can also use Raster + Graphics:

Graphics[Raster[MapIndexed[List @@ Lighter[{Red, Blue, Green}[[#2[]]], #] &,
Reverse @ matrix, {2}]],
Frame -> True,
FrameTicks -> {{#, #} &@({# - .5, 4 - #} & /@ Range),
{#, #} &@({# - .5, #} & /@ Range)}] Apparently ArrayPlot accepts a matrix of color swatches. So one way of achieving the desired result is to replace all of the elements of the matrix with corresponding swatches. This can be done using the Lighter function

matrix = {{0.1, 0.1, 0.1}, {0.3, 0.3, 0.3}, {0.5, 0.5, 0.5}};
trans = Transpose[matrix];
swatchMatrix = Transpose[{
Lighter[ Red, #] & /@ trans[]
, Lighter[ Blue, #] & /@ trans[]
, Lighter[ Green, #] & /@ trans[]
}];

ArrayPlot[swatchMatrix]