How can I get shades and tints of a color hex in an automatic way (maybe still represented as color hex, or also color rgb)? Is there any in-built function?
You could also linearize the RGB values in some way prior to interpolating, or you could do the interpolation using a different color model. You could make it as complicated as you like. I didn't bother to see how exactly that website chose to do it.
However, the code you wrote here does not work for me, but I changed it and it is now working (I used just one file exchange to convert outputs to char hex tuples):
Hm. I wonder what was going wrong. FWIW, it worked for me in R2019b, but maybe there was some version dependence or array orientation issue. Either way, using the FEX tool certainly simplifies the syntax. Glad you got it working.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.