JavaScript Random Color Generator
Looks very good. And, as far as I know, your colour generator is fair.

For efficiency

you don't need to generate a random number for every hex character. You are choosing among 256^3 (16&nbsp;777&nbsp;216) colours, labeled with every number from 0x0 (0 in decimal) to 0xFFFFFF (256^3-1 in decimal, or 16&nbsp;777&nbsp;215).

So you can:


generate a random number let randomNum = Math.floor(Math.random() * 16777216) // 256^3
use an inherent function for JavaScript Numbers, toString, to convert it to a string with an arbitrary radix: 
let hextest = randomNum.toString(16)

By design, randomNum is a natural number (non-negative or 0) so you don't need code for validation).
pad it with zeros. This question was asked a million times in Stack Overflow (this is only an example).

For your example, where you don't need validation, hextest = ('00000' + hextest).substr(-6) will do. (After padding with all the zeros you'd ever need, picks only the last 6 characters.)
convert to uppercase and decorate: hextest = '#' + hextest.toUppercase(). Reference for toUpperCase()


This way you can get rid of the hexChars constant.

For functionality

I don't have any good idea on how to add functions. But I can suggest an improvement:

in the code you have to capture spacebar presses, add the line e.preventDefault(). This will prevent the default behaviour for the space key (which is scrolling a screen down).

That way, you can add all the content you want to your page without fear of accidentally scrolling down (and it won't scroll down Code Review when I try your embedded snippet, either).