Colored code output in html

is there a way to have colored code output in knitted html?

I tried to use crayon package, but it only worked for Rstudio console output .

This is what I want to achieve:
Currently the "Hello" is formatted the same way as the code above - not bold and black.

I am new to the whole RStudio, so I dont really know how the whole knitr works and googling didnt help so far.