Enter RGB values (0–255 each) to get the hex colour code — or enter a hex code to convert to RGB.
Hexadecimal is a base-16 number system. It uses 16 symbols: the digits 0–9 and the letters A–F (where A=10, B=11, C=12, D=13, E=14, F=15).
| Decimal | Hex | Binary | Decimal | Hex | Binary |
|---|
The key insight is that one hex digit = four binary bits. This makes hex a compact and human-readable shorthand for binary. A byte (8 bits) is always exactly two hex digits (00 to FF).
Multiply each hex digit by 16 raised to its positional power (rightmost position = 0), then sum the results:
Hex arithmetic works exactly like decimal arithmetic, but you carry when a column sum reaches 16 (not 10):
Web colours are specified as six hex digits in the format #RRGGBB, where each pair represents the red, green, and blue channels on a scale of 00 (0) to FF (255):
With 256 levels per channel, there are 256³ = 16,777,216 possible colours — over 16 million. Shorthand 3-digit codes (#F00) expand to 6 digits by doubling each digit (#FF0000).
Computer memory is byte-addressable, and memory addresses are displayed in hex because it is compact and maps cleanly to binary. Examples:
The 0x prefix is the convention in C, C++, Python, and many other languages to indicate a hexadecimal literal. In assembly language and many debugging tools, hex is the standard for addresses, opcodes, and raw data.
| Decimal | Hex | Binary | Decimal | Hex | Binary |
|---|
This converter provides instant, accurate results for your measurement conversions. The UK uses a mix of metric and imperial measurements in daily life, which can make conversions a frequent necessity. Road signs use miles, food is sold in grams and kilograms, and height is often quoted in feet and inches despite the metric system being the official standard.
Understanding the conversion formula helps verify results and perform quick mental calculations when a tool is not available.
Common UK conversion factors: 1 inch = 2.54 cm, 1 foot = 30.48 cm, 1 mile = 1.609 km, 1 pound (lb) = 0.4536 kg, 1 stone = 6.35 kg, 1 pint (UK) = 568 ml, 1 gallon (UK) = 4.546 litres, 1 acre = 0.4047 hectares. Temperature conversions use the formula: Celsius = (Fahrenheit - 32) x 5/9.
To convert 5 feet 10 inches to centimetres: first convert to total inches (5 x 12 + 10 = 70 inches), then multiply by 2.54 to get 177.8 cm. For weight, a person weighing 12 stone 7 lbs is 12.5 stone, which equals 79.4 kg (12.5 x 6.35).
Source: Based on international measurement standards. Last updated March 2026.
Data verified against official UK government sources. Last checked April 2026.