Pick any color and convert between HEX, RGB, HSL, and CMYK. Check WCAG contrast ratios and explore shades and tints — all in your browser.
HEX
#6366F1
RGB
rgb(99, 102, 241)
CSS
rgb(99 102 241)
Choose a color with the native picker or enter a HEX value. Results update immediately and remain in your browser.
| Format | Example | Use |
|---|---|---|
| HEX | #6366f1 | Compact notation for a screen color |
| RGB | rgb(99, 102, 241) | Explicit red, green, and blue channels |
| CSS rgb | rgb(99 102 241) | Modern CSS function syntax |
HEX values use three or six hexadecimal digits. Six-digit values contain one pair
for each channel: red, green, and blue. Channel values range from 00 to FF,
which corresponds to 0 through 255 in RGB.
:root {
--brand: #6366f1;
--brand-rgb: rgb(99 102 241);
}
button {
color: white;
background: var(--brand);
}
const hex = "#6366f1";
const rgb = "rgb(99 102 241)";
document.documentElement.style.setProperty("--brand", hex);
hex_color = "#6366f1"
red, green, blue = 99, 102, 241
HEX is convenient in stylesheets and design tokens because it is short and
portable. RGB is useful when code needs to manipulate individual channels,
blend colors, or add transparency with rgba() or the CSS rgb() alpha
component.
The comma-separated and space-separated CSS forms represent the same opaque color:
color: rgb(99, 102, 241);
color: rgb(99 102 241);
#fff before using them.This tool is provided for general informational and utility purposes only. Results may be inaccurate, incomplete, outdated, or contain errors. Always verify results before relying on or using them.
Some tools may use AI, automated processing, third-party services, or server-side processing. Do not rely on these tools as a substitute for professional advice.
Use at your own risk. BestToolOnline makes no guarantees regarding the accuracy, reliability, completeness, availability, or suitability of results, to the maximum extent permitted by applicable law.
See our Terms of Service and Privacy Policy for complete details.