Module talk:number utilities

Checking for a hexadecimal number
Hi,, would it be possible to update this module so that it can be used to check whether an input is a hexadecimal number, and then either update or create  to implement it? I would like to update and need a way to check if the first parameter is a six-digit hexadecimal (that is, a colour expressed as a hex triplet rather than a colour name), and can't think of a convenient way to do this using HTML or Wikitext. I suspect this can be quite easy done using Lua. — SGconlaw (talk) 13:07, 7 October 2020 (UTC)
 * Yup, that's very easy. I've created the template, and you can use it as, or, if you want to allow empty numbers, . It's a little different in that it doesn't return the decimal version of the number as does, but I can change that if necessary. (Also, for programmers,  currently doesn't accept a leading   before the hex digits.) — Eru·tuon 19:29, 7 October 2020 (UTC)
 * thank you! I've updated . — SGconlaw (talk) 19:58, 7 October 2020 (UTC)