RGB to HEX Converter
Convert red, green, and blue values (0-255) into standard CSS hexadecimal codes.
Standard CSS syntax supported in all browsers
Modern space-separated CSS Color Module Level 4
Ready-to-use CSS variable
Allows dynamic alpha via rgb(var(--color-primary-rgb) / 0.5)
Tailwind v3/v4 theme color with dynamic opacity support
Parsed object with integer channels and alpha
Channel numbers array
Normalized 0.0 to 1.0 floats for shaders & canvas
iOS SwiftUI color initializer
Native Android Kotlin Color instance
Android resources colors.xml entry
Flutter 0xAARRGGBB hexadecimal format
Hue, Saturation, Lightness representation
Hue, Saturation, Value used in digital design tools
Cyan, Magenta, Yellow, Key for printing reproduction
Perceptually uniform modern color space
Wide color gamut for modern Apple and HDR displays
How to Use RGB to HEX Converter
Input R, G, and B numbers (0-255).
View instant HEX color code.
Copy result.
Frequently Asked Questions
What if values exceed 255?
Values are automatically clamped between 0 and 255.
Related Developer Tools
Explore more free client-side developer utilities in this category