Skip to content

Basic HTML and CSS color

Teal #008080

Teal (CSS keyword teal) has the hex code #008080 and the RGB value rgb(0, 128, 128): a medium-dark, moderately saturated cyan.

Teal#008080

Teal (#008080) is one of the 16 original HTML colors. The name comes from the common teal, a duck with a blue-green stripe on its head.

Color codes for Teal

Color codes for Teal
CSS keywordteal
HEX#008080
RGBrgb(0, 128, 128)
HSLhsl(180, 100%, 25%)
HWBhwb(180 0% 50%)
OKLCHoklch(54.3% 0.093 194.8)
CMYK (naive, no ICC profile)cmyk(100%, 0%, 0%, 50%)
Decimal32,896
Hue familyCyans and teals

Contrast and accessibility

On teal, white text has a contrast ratio of 4.77:1 and passes AA for normal text; black text reaches 4.39:1.

WCAG 2.2 contrast ratios (success criteria 1.4.3 and 1.4.6: AA needs 4.5:1 for normal text and 3:1 for large text, AAA needs 7:1 and 4.5:1). APCA Lc is the lightness contrast from the APCA-W3 0.0.98G model proposed for WCAG 3; a higher absolute value is more readable, and Lc 75 is its suggested minimum for body text.

Contrast and accessibility
PairRatioAAAA largeAAAAAA largeAPCA Lc
Black text on teal4.39:1FailPassFailFail31.5
White text on teal4.77:1PassPassFailPass−78.0
Teal text on white4.77:1PassPassFailPass72.6
Teal text on black4.39:1FailPassFailFail−29.1

Tints and shades

Each step mixes teal with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, teal, white 25%) in CSS.

Tints (mixed with white)

  1. 5%
    #0d8686
  2. 15%
    #269393
  3. 25%
    #40a0a0
  4. 35%
    #59acac
  5. 45%
    #73b9b9
  6. 55%
    #8cc6c6
  7. 65%
    #a6d3d3
  8. 75%
    #bfdfdf
  9. 85%
    #d9ecec
  10. 95%
    #f2f9f9

Shades (mixed with black)

  1. 5%
    #007a7a
  2. 15%
    #006d6d
  3. 25%
    #006060
  4. 35%
    #005353
  5. 45%
    #004646
  6. 55%
    #003a3a
  7. 65%
    #002d2d
  8. 75%
    #002020
  9. 85%
    #001313
  10. 95%
    #000606

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, teal's complementary color is #9E585E (close to sienna), its analogous colors are #308062 and #207A98, and its triadic partners are #845E95 and #8F672A. For text on top, white gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#9e585e
Analogous−30°, +30°#308062#207a98
Triadic+120°, +240°#845e95#8f672a
Split-complementary+150°, +210°#96597c#9c5d40

Computed in OKLCH: the hue is rotated by 180° (complementary), ±30° (analogous), ±120° (triadic) and 180° ±30° (split-complementary) while lightness and chroma stay fixed. Results that fall outside sRGB are brought back with the CSS Color 4 gamut mapping algorithm. Because this uses OKLCH, the values differ from tools that rotate hue in HSL, but every color keeps the same perceived lightness.

Warm or cool?

Teal is a cool color: its hue is 180° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.

Nearest named and Tailwind colors

Distance is ΔE OK, the Euclidean distance in OKLab multiplied by 100. Values under about 2 are hard to tell apart side by side.

Nearest CSS named colors

Nearest CSS named colors
ColorHEXΔE OK
darkcyan#008b8b3.4
seagreen#2e8b578.0
slategray#7080909.3

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
teal-700#00786f3.5
cyan-700#0075955.5
teal-600#0096896.5

Code snippets

CSS
.element {
  color: teal;
  background-color: #008080;
  border-color: rgb(0 128 128);
  outline-color: oklch(54.3% 0.093 194.8);
}
Tailwind CSS
<div class="bg-[#008080] text-white">...</div>

/* or register it once in your CSS (Tailwind v4) */
@theme {
  --color-teal: #008080;
}
/* then use bg-teal, text-teal, border-teal */
SwiftUI
import SwiftUI

extension Color {
  static let teal = Color(red: 0.000, green: 0.502, blue: 0.502)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

val Teal = Color(0xFF008080)
Flutter
import 'package:flutter/material.dart';

const teal = Color(0xFF008080);
Android XML
<!-- res/values/colors.xml -->
<color name="teal">#008080</color>

Frequently asked questions

What is the hex code for teal?
The hex code for teal is #008080. The same color is rgb(0, 128, 128), hsl(180, 100%, 25%) and oklch(54.3% 0.093 194.8), and in CSS you can also write the keyword teal directly.
Is teal a warm or cool color?
Teal is a cool color: its hue is 180° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.
What colors go with teal?
Rotating the hue in OKLCH while keeping lightness and chroma, teal's complementary color is #9E585E (close to sienna), its analogous colors are #308062 and #207A98, and its triadic partners are #845E95 and #8F672A. For text on top, white gives the higher contrast.
Can you use white text on teal?
White text on teal has a contrast ratio of 4.77:1, which passes AA for normal text but not AAA under WCAG 2.2. Black text reaches 4.39:1 and passes AA only for large text (24 px, or 18.66 px bold, and up). In APCA terms that is Lc −78.0 for white and Lc 31.5 for black.
What is the RGB value of teal?
Teal is rgb(0, 128, 128): red 0, green 128 and blue 128 on the 0 to 255 scale, or 0.0%, 50.2% and 50.2%. As a decimal integer it is 32896.

Last reviewed by Arielton Oberek.