Math & Color

Number base conversions, color format conversions and quick calculators for developers and designers.

Two conversions come up constantly for developers and designers, and each has a tool of its own here. The Number Base Converter moves a value between binary, octal, decimal and hexadecimal all at once — useful when a permission mask reads 0o755, a colour byte is 0xFF, or you want to confirm that 0b1010 really is 10. It shows all four representations side by side, so you can read a hex dump or set a bit flag without working the powers of two in your head.

The Color Converter does the same job for colour: paste a #3B82F6 hex value and it returns the equivalent rgb(), hsl() and oklch() forms. That matters because the models describe colour differently — HSL is easy to reason about for lightness and saturation, while OKLCH is perceptually uniform, so a fixed step in lightness looks like an even step to the eye.

Both tools run entirely in the page; there is no round trip through a server, and nothing you type is recorded. A couple of practical notes: the base converter works on integers, so fractional binary is out of scope, and colour conversion between models can round at the last digit, since not every RGB value maps to a tidy HSL triple. For building an accessible palette, OKLCH's even lightness scale is the one to reach for; for matching an existing brand colour, start from its hex and read across.