Making a wall material with a rim

I am trying to make a wall material that has a rim something like this:

I want to make a wall material like this that can tile but still have the rim in the same material. So far I haven’t found anything on how to make a material like this.