DFA · Regular
A hex colour: #rgb or #rrggbb
A # and exactly three or six hex digits (h). After three digits the machine is in an accepting state that can still be extended — but only by exactly three more.
The author’s examples, run
#hhh → accept#hhhhhh → accepthhhh → rejecthhhhhhh → rejectε → reject##hh# → reject