# is_hex

Python reference for `nagasim.appearance.is_hex`. Provisional: it may change between minor versions, see [Appearance](../../appearance.md).

`nagasim.appearance.is_hex`

```python
is_hex(value)
```

Whether *value* is a colour `#RRGGBB`: six hex digits, either case, nothing around them.

Parameters
----------
value : object
    Anything; a non-string is never a colour.

Returns
-------
bool
    True for `"#5e646b"` or `"#5E646B"`; False for `"#abc"`, `"5E646B"` or `"#5E646B "`.

See Also
--------
nagasim.appearance.material : Turns a hex frame colour into paint.

Examples
--------
>>> from nagasim.appearance import is_hex
>>> is_hex("#1F4C9E"), is_hex("blue")
(True, False)
