I'm guessing from context that the missing packages to make your code work are
library(raster)
library(rasterVis)
library(viridis)
The second question
Also, I want to have lat/lon on my axis.
is rather easy to answer: If your raster has the proper spatial reference, you will have lat/lon on your axis automatically. Here's an example that assumes that your raster is located between 7 and 10 degrees East and 8 and 12 degrees South, with a cell size of 1x1 degrees in an unprojected geographic coordinate reference system (EPSG 4326 = plain WGS84):
my_class <- raster(x=matrix(sample(x = 1:5, size = 12, replace=TRUE),4,3),
xmn=7, xmx=10, ymn=-12, ymx=-8,
crs=CRS("+init=epsg:4326"))
levelplot(my_class, col.regions=viridis, at=seq(1, 5, len=6))
The main question is not quite clear to me (I should probably put that into a comment but I don't have enough reputation here yet …): The figure you use as an example has two layers of data, one is represented though the hue (color, purple-to-orange gradient) and the other is represented through the overlay of a shadow (basically black with varying degrees of transparency a.k.a. "alpha channel") on top of that. Your example on the other hand has only one layer of data, so I'm wondering what would govern the varying degree of shading?
Edit: based on the explanation below, I think it might be best to manually specify the colors for certain values. You can use viridis as a starting point (or get a nice palette from colorbrewer2.org). Calling that function directly gives you n colors in html notation:
> viridis(n = 5)
[1] "#440154FF" "#3B528BFF" "#21908CFF" "#5DC863FF" "#FDE725FF"
You could store them in a variable and use that to specify the colors you want in your plotting function:
cols <- viridis(n = 5)
levelplot(my_class, col.regions=cols, at=seq(1, 5, len=6))
But you could also edit them first – most graphics programs can help you with that, or you use a dedicated color picker program (there are plenty free options, I'm using Gpick). With that you could for example de-saturate the colors for 1, 4, and 5, leaving the ones for 2 and 3 untouched:
cols <- c("#503E54FF", "#3B528BFF", "#21908CFF", "#9BC89EFF", "#FDF5ABFF")
levelplot(my_class, col.regions=cols, at=seq(1, 5, len=6))
Doesn't quite look nice yet, so you'd have to play around with the colors a bit. Using a more saturated palette to start with would probably bring make the effect more obvious.