#313334 Onyx
rgb(49, 51, 52)
Color conversions
- HEX
- #313334
- RGB
- rgb(49, 51, 52)
- RGBA
- rgba(49, 51, 52, 1)
- HSL
- hsl(200, 3%, 20%)
- HSV / HSB
- hsv(200, 6%, 20%)
- CMYK
- cmyk(6%, 2%, 0%, 80%)
Wide-gamut spaces
- XYZ
- xyz(3.07, 3.269, 3.717)
- LAB
- lab(21.09 -0.63 -0.94)
- LCH
- lch(21.09 1.13 236.1)
- OKLAB
- oklab(31.95% -0.0022 -0.0025)
- OKLCH
- oklch(31.95% 0.0033 228.89)
- Nearest name
- Onyx
Shades, tints and tones
Color harmonies
The hue directly opposite on the color wheel. Maximum contrast, ideal for a single accent against a dominant brand color.
Neighbouring hues that share a temperature. The safest harmony for calm, cohesive interfaces.
Three hues evenly spaced 120 degrees apart. Vibrant and balanced — use one as dominant and the other two sparingly.
The complement split into two adjacent hues. Nearly the contrast of complementary with noticeably less tension.
Four hues at 90-degree intervals. A rich set for illustration, data visualisation, and category coding.
Two complementary pairs offset by 60 degrees. Gives two warm and two cool options in one system.
Similar colors
Opacity variations
#3133341a
#31333433
#3133344d
#31333466
#31333480
#31333499
#313334b3
#313334cc
#313334e6
#313334ff
Accessibility and contrast
On white
12.7:1
Body text AAA · Large text AA
On black
1.65:1
Body text Fail · Large text Fail
White-on-color contrast is 12.7:1.
Color blindness preview
Protanopia
No red cones — ~1% of men
Protanomaly
Reduced red sensitivity — ~1% of men
Deuteranopia
No green cones — ~1% of men
Deuteranomaly
Reduced green sensitivity — ~5% of men
Tritanopia
No blue cones — very rare
Tritanomaly
Reduced blue sensitivity — very rare
Achromatopsia
No color perception — ~1 in 30,000
Achromatomaly
Partial color perception — rare
Meaning, psychology and brand usage
The structural colour every interface actually runs on
Neutral grays carry no emotional charge, which is precisely their value: they let content and brand colour do the signalling. Their temperature matters more than designers expect — a cool gray beside a warm brand colour reads as a mistake.
Neutrality, professionalism, and precision. Overuse reads as noncommittal or unfinished.
Payne's gray, mixed rather than mined, became the painter's shortcut for atmospheric shadow. Swiss modernism turned systematic gray scales into a design methodology.
Build a full gray ramp before choosing a brand colour. Match the gray's temperature to the brand hue and reserve the darkest steps for type rather than large fills.
Common industries: Enterprise, Architecture, Automotive, Consulting, Hardware. Pairs well with a single saturated accent, warm white for text surfaces, near-black for hierarchy.
Code exports
CSS
:root {
--color-onyx: #313334;
--color-onyx-rgb: 49 51 52;
--color-onyx-hsl: 200 3% 20%;
--color-onyx-oklch: 31.95% 0.0033 228.89;
}
.element {
color: #313334;
background-color: hsl(200, 3%, 20%);
border: 1px solid rgb(49 51 52 / 40%);
}SCSS
$onyx: #313334;
$onyx-light: #98999a;
$onyx-dark: #191a1a;
.element {
color: $onyx;
background: rgba($onyx, 0.12);
&:hover {
color: darken($onyx, 8%);
}
}LESS
@onyx: #313334;
@onyx-light: lighten(@onyx, 12%);
@onyx-dark: darken(@onyx, 12%);
.element {
color: @onyx;
background: fade(@onyx, 12%);
}Tailwind CSS
/* Tailwind v4 — src/styles.css */
@theme {
--color-onyx-50: #d6d6d6;
--color-onyx-100: #c1c2c2;
--color-onyx-200: #adadae;
--color-onyx-300: #838585;
--color-onyx-400: #5a5c5d;
--color-onyx-500: #313334;
--color-onyx-600: #2c2e2f;
--color-onyx-700: #222424;
--color-onyx-800: #191a1a;
--color-onyx-900: #0f0f10;
}
/* Usage */
<div class="bg-onyx-500 text-onyx-50 ring-onyx-600" />
/* Arbitrary value, no config needed */
<div class="bg-[#313334]" />Bootstrap
// Bootstrap 5 — _variables.scss (before importing bootstrap)
$onyx: #313334;
$primary: $onyx;
$theme-colors: map-merge($theme-colors, (
"onyx": $onyx
));
// Generates .text-onyx, .bg-onyx, .btn-onyx
@import "bootstrap/scss/bootstrap";Flutter
import 'package:flutter/material.dart';
const Color onyx = Color(0xFF313334);
// As a MaterialColor swatch
const MaterialColor onyxSwatch = MaterialColor(0xFF313334, <int, Color>{
50: Color(0xFFD6D6D6),
100: Color(0xFFC1C2C2),
200: Color(0xFFADADAE),
300: Color(0xFF838585),
400: Color(0xFF5A5C5D),
500: Color(0xFF313334),
600: Color(0xFF2C2E2F),
700: Color(0xFF222424),
800: Color(0xFF191A1A),
900: Color(0xFF0F0F10),
});Swift / SwiftUI
import SwiftUI
extension Color {
/// #313334 — Onyx
static let onyx = Color(
red: 0.1922,
green: 0.2,
blue: 0.2039
)
}
// UIKit
extension UIColor {
static let onyx = UIColor(
red: 0.1922,
green: 0.2,
blue: 0.2039,
alpha: 1.0
)
}Android
<!-- res/values/colors.xml -->
<resources>
<color name="onyx">#313334</color>
<color name="onyx_translucent">#80313334</color>
</resources>
<!-- Jetpack Compose -->
val Onyx = Color(0xFF313334)JavaScript
export const ONYX = {
hex: "#313334",
rgb: [49, 51, 52],
hsl: [200, 3, 20],
oklch: "oklch(31.95% 0.0033 228.89)",
};JSON tokens
{
"$schema": "https://design-tokens.org/schema.json",
"onyx": {
"$type": "color",
"$value": "#313334",
"$description": "Onyx — generated by ColorVerse AI"
}
}