How to reference a tilemap component from script

I’m trying to write a script that changes the color of the the entire tilemap, but when I try to reference the tilemap component in the way shows below, I get an error saying “The type or namespace Tilemap could not be found”. There aren’t any typos, I have attached a tilemap component and this method of referencing components has worked for every other component I’ve ever referenced in a script. Why isn’t this working?

Tilemap tm;

 // Start is called before the first frame update
 void Start()
 {
     tm = GetComponent<Tilemap>();
 }

Ok so turns out all I needed was to put Using UnityEngine.Tilemaps; at the top. Even if I ended up finding the answer myself, I’ll leave this question here for anyone else who runs into the same problem

@PastaMan64 Thanks for posting the solution for the handful of us that needed it!