Here I demonstrate how to represent functions using colors.

Mathematica has many ways of communicating colors. The simplest one is Hue[]. The variable in Hue is between 0 and 1

Graphics[{Hue[0.8],Disk[{0,0},1]},PlotRange->{{-1.5,1.5},{-1.5,1.5}}]

Coloring 10 disks in different colors using Hue[]

Graphics[Table[{Hue[(k/10)],Disk[{k,0},1]},{k,0,10}],PlotRange->{{-1.5,11.5},{-1.5,1.5}}]

Coloring 100 disks in different colors using Hue[]

Graphics[Table[{Hue[(k/100)],Disk[{k,0},1]},{k,0,100}],PlotRange->{{-1.5,101.5},{-1.5,1.5}},ImageSize->400,AspectRatio->0.1]

A convenient way of generating lists of numbers in Mathematica is offered by function Range

Range[0,1,1/10]

A convenient way of applying a function to a list is given by so called pure function. To make the Sin function into a pure function we write

Sin[#]&

But, more importantly, here is how to make the square function into a pure function

(((#)^2))&[2]

Apply the square to a list

(((#)^2))&/@Range[0,1,1/10]

Demonstrating Hue[] on the unit interval using many rectangles.

st=(1/200);cc=0.002;hh=0.1;LL=1;Graphics[{
{Hue[#],Polygon[{{#-(st/2)-cc,0},{#+(st/2)+cc,0},{#+(st/2)+cc,hh},{#-(st/2)-cc,hh},{#-(st/2)-cc,0}}]}&/@Range[0+(st/2),LL-(st/2),st],{Thickness[0.005],Line[{{0-(st/2),0},{LL+(st/2),0},{LL+(st/2),0.1},{0-(st/2),0.1},{0-(st/2),0}}]}},Frame->True,FrameTicks->{{None,None},{Automatic,None}},ImageSize->400]

This is the sin function using Hue

st=(Pi/200);cc=0.002;hh=0.2;LL=Pi;Graphics[{
{Hue[Sin[#]],Polygon[{{#-(st/2)-cc,0},{#+(st/2)+cc,0},{#+(st/2)+cc,hh},{#-(st/2)-cc,hh},{#-(st/2)-cc,0}}]}&/@Range[0+(st/2),LL-(st/2),st],{Thickness[0.005],Line[{{0-(st/2),0},{LL+(st/2),0},{LL+(st/2),hh},{0-(st/2),hh},{0-(st/2),0}}]}},Frame->True,FrameTicks->{{None,None},{Range[0,Pi,(Pi/8)],None}},ImageSize->400]

Next, I want to produce a coloring of the unit interval which will transition from white to red.

First, this is the Red Color

RGBColor[1,0,0]

This is the White Color

RGBColor[1,1,1]

How you transition from red to white is by using convex combination of vectors

(t)*{1,0,0}+(1-t) {1,1,1}

At t = 0 we are at white

((t)*{1,0,0}+(1-t) {1,1,1})/.{t->0}

At t=1 we are red

((t)*{1,0,0}+(1-t) {1,1,1})/.{t->1}

st=(1/200);cc=0.001;hh=0.1;LL=1;Graphics[{
{RGBColor[1,1-#,1-#],Polygon[{{#-(st/2)-cc,0},{#+(st/2)+cc,0},{#+(st/2)+cc,hh},{#-(st/2)-cc,hh},{#-(st/2)-cc,0}}]}&/@Range[0+(st/2),LL-(st/2),st],{Thickness[0.005],Line[{{0-(st/2),0},{LL+(st/2),0},{LL+(st/2),0.1},{0-(st/2),0.1},{0-(st/2),0}}]}},Frame->True,FrameTicks->{{None,None},{Automatic,None}},ImageSize->400]

This is the sin function from 0 - white to 1 - red in the shades of red.

st=(Pi/200);cc=0.002;hh=0.2;LL=Pi;Graphics[{
{RGBColor[1,1-Sin[#],1-Sin[#]],Polygon[{{#-(st/2)-cc,0},{#+(st/2)+cc,0},{#+(st/2)+cc,hh},{#-(st/2)-cc,hh},{#-(st/2)-cc,0}}]}&/@Range[0+(st/2),LL-(st/2),st],{Thickness[0.005],Line[{{0-(st/2),0},{LL+(st/2),0},{LL+(st/2),hh},{0-(st/2),hh},{0-(st/2),0}}]}},Frame->True,FrameTicks->{{None,None},{Range[0,Pi,(Pi/8)],None}},ImageSize->400]

These are the powers of Sin[x] function from 0 - white to 1 - red in the shades of red.

st=(Pi/200);cc=0.002;hh=0.2;LL=Pi;
Manipulate[Graphics[{
{RGBColor[1,1-(((Sin[#]))^nn),1-(((Sin[#]))^nn)],Polygon[{{#-(st/2)-cc,0},{#+(st/2)+cc,0},{#+(st/2)+cc,hh},{#-(st/2)-cc,hh},{#-(st/2)-cc,0}}]}&/@Range[0+(st/2),LL-(st/2),st],{Thickness[0.005],Line[{{0-(st/2),0},{LL+(st/2),0},{LL+(st/2),hh},{0-(st/2),hh},{0-(st/2),0}}]}},Frame->True,FrameTicks->{{None,None},{Range[0,Pi,(Pi/8)],None}},ImageSize->400],{nn,Range[1,20],Setter,ControlPlacement->Top}]

Manipulate[Plot[(((Sin[x]))^nn),{x,0,Pi},PlotRange->{0,1},AspectRatio->Automatic,ImageSize->400],{nn,Range[1,20],Setter},ControlPlacement->Top]