A color you will keep working with: its harmony schemes, a palette of up to 24, and a file for your code.
Downside
It needs a Bravely account, and the converter on this page doesn't pass its color over: paste it in.
What it doesn’t do
It converts one color at a time. There is no list or file input.
It doesn't read hsv(), hwb(), lab() or oklch() values.
HSL, HSV and alpha are rounded, so converting one of them back can land one step from the color you started with.
It doesn't keep or export colors: that is the full color picker's job.
Good to know
How the math works
Divide by 16: the whole part is the first digit, the remainder the second.
Read more
Red, green and blue are each a whole number from 0 to 255, and two base-16 digits cover exactly that range. Base 16 counts 0 to 9 and then a to f, so a stands for 10 and f for 15. To write a channel, divide it by 16. The whole part of the answer is the first digit and the remainder is the second.
Take rgb(52, 211, 153). 52 is 3 sixteens and 4 left over: 34. 211 is 13 sixteens and 3 left over, and 13 is written d: d3. 153 is 9 sixteens and 9 left over: 99. Joined after a #, that is #34d399. A second one: rgb(52, 152, 219) is 34, 98 and db, so #3498db. A channel under 16 has no sixteens, so its first digit is 0: rgb(0, 128, 0) is #008000.
What stays exact, and what is rounded
HEX and RGB map one to one. HSL, HSV and alpha are rounded.
Read more
An opaque color converts between RGB and HEX with nothing lost in either direction, because each channel is the same whole number written two ways. Decimals and percentages are legal in CSS, and the converter rounds them to whole channels first: rgb(52.4, 211.6, 153) reads as #34d499. A number above 255 is held at 255.
HSL and HSV are shown as whole numbers, so they are close, not exact. The HSL beside #34d399 is hsl(158, 64%, 52%), and typing that value back gives #36d399, one step of red away. Alpha is kept to two decimal places, so a transparency can shift by one step the same way. When the exact color matters, carry the HEX or the RGB. HSV is the model behind the square in our color picker, and it isn't a CSS notation: a stylesheet takes hsl(), not hsv().
Frequently asked questions
How do I convert RGB to hex?
Paste the value into the box at the top of this page and copy the HEX row. By hand, write each of the three numbers as two base-16 digits and join them after a #: rgb(52, 211, 153) becomes 34, d3 and 99, so the code is #34d399.
What is rgb(255, 255, 255) as a hex code?
#ffffff, which is white: 255 is ff in base 16, three times over. Black, rgb(0, 0, 0), is #000000, and pure red, rgb(255, 0, 0), is #ff0000. The table on this page turns the numbers you meet most into their pairs.
How do I convert RGBA to hex?
Convert red, green and blue as usual, then multiply the alpha by 255, round it, and write it as a fourth pair. rgba(52, 211, 153, 0.5) gives 127.5, which rounds to 128, or 80, so the code is #34d39980. In an eight-digit code, 00 is fully transparent and ff is fully opaque.
Is hex the same as RGB?
In CSS, yes: both write the same sRGB color, and a stylesheet accepts either wherever a color goes. The CSS specification's own example is #00ff00, which it says is the same color as rgb(0 255 0). Hex is shorter, and rgb() shows the three numbers.
Does it read modern rgb()?
Yes. CSS now writes rgb() with spaces and a slash before the alpha, as in rgb(52 211 153 / 50%), and treats rgba() as another name for rgb(). The converter reads both forms, and percentages too.
Do I need an account?
No. Nothing on this page asks for one. The full color picker it links to, where palettes are built and exported, opens after you sign in to a free Bravely account and claim it once.