CSS named color
ForestGreen #228B22
ForestGreen (CSS keyword forestgreen) has the hex code #228B22 and the RGB value rgb(34, 139, 34): a medium-dark, vivid green.
A medium, natural green evoking dense foliage. It is darker than limegreen and more saturated than seagreen, a frequent pick for "success" states.
Color codes for ForestGreen
| CSS keyword | forestgreen |
|---|---|
| HEX | #228B22 |
| RGB | rgb(34, 139, 34) |
| HSL | hsl(120, 61%, 34%) |
| HWB | hwb(120 13% 45%) |
| OKLCH | oklch(55.8% 0.169 142.9) |
| CMYK (naive, no ICC profile) | cmyk(76%, 0%, 76%, 45%) |
| Decimal | 2,263,842 |
| Hue family | Greens |
Contrast and accessibility
On forestgreen, black text has a contrast ratio of 4.78:1 and passes AA for normal text; white text reaches 4.38: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.
| Pair | Ratio | AA | AA large | AAA | AAA large | APCA Lc |
|---|---|---|---|---|---|---|
| Black text on forestgreen | 4.78:1 | Pass | Pass | Fail | Pass | 34.2 |
| White text on forestgreen | 4.38:1 | Fail | Pass | Fail | Fail | −75.4 |
| Forestgreen text on white | 4.38:1 | Fail | Pass | Fail | Fail | 69.9 |
| Forestgreen text on black | 4.78:1 | Pass | Pass | Fail | Pass | −31.7 |
Tints and shades
Each step mixes forestgreen with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, forestgreen, white 25%) in CSS.
Tints (mixed with white)
- 5%
#2d912d - 15%
#439c43 - 25%
#59a859 - 35%
#6fb46f - 45%
#85bf85 - 55%
#9ccb9c - 65%
#b2d6b2 - 75%
#c8e2c8 - 85%
#deeede - 95%
#f4f9f4
Shades (mixed with black)
- 5%
#208420 - 15%
#1d761d - 25%
#1a681a - 35%
#165a16 - 45%
#134c13 - 55%
#0f3f0f - 65%
#0c310c - 75%
#092309 - 85%
#051505 - 95%
#020702
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, forestgreen's complementary color is #A14AAC (close to darkorchid), its analogous colors are #767B00 and #008B6C, and its triadic partners are #3C6DD5 and #C33E42. For text on top, black gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #a14aac |
| Analogous | −30°, +30° | #767b00#008b6c |
| Triadic | +120°, +240° | #3c6dd5#c33e42 |
| Split-complementary | +150°, +210° | #7a5acc#b93f7c |
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?
ForestGreen is a cool color: its hue is 120° 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.
Code snippets
.element {
color: forestgreen;
background-color: #228b22;
border-color: rgb(34 139 34);
outline-color: oklch(55.8% 0.169 142.9);
}<div class="bg-[#228b22] text-black">...</div>
/* or register it once in your CSS (Tailwind v4) */
@theme {
--color-forestgreen: #228b22;
}
/* then use bg-forestgreen, text-forestgreen, border-forestgreen */import SwiftUI
extension Color {
static let forestgreen = Color(red: 0.133, green: 0.545, blue: 0.133)
}import androidx.compose.ui.graphics.Color
val Forestgreen = Color(0xFF228B22)import 'package:flutter/material.dart';
const forestgreen = Color(0xFF228B22);<!-- res/values/colors.xml -->
<color name="forestgreen">#228B22</color>Frequently asked questions
- What is the hex code for forestgreen?
- The hex code for forestgreen is #228B22. The same color is rgb(34, 139, 34), hsl(120, 61%, 34%) and oklch(55.8% 0.169 142.9), and in CSS you can also write the keyword forestgreen directly.
- Is forestgreen a warm or cool color?
- ForestGreen is a cool color: its hue is 120° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.
- What colors go with forestgreen?
- Rotating the hue in OKLCH while keeping lightness and chroma, forestgreen's complementary color is #A14AAC (close to darkorchid), its analogous colors are #767B00 and #008B6C, and its triadic partners are #3C6DD5 and #C33E42. For text on top, black gives the higher contrast.
- Can you use white text on forestgreen?
- White text on forestgreen has a contrast ratio of 4.38:1, which passes AA only for large text (24 px, or 18.66 px bold, and up) under WCAG 2.2. Black text reaches 4.78:1 and passes AA for normal text but not AAA. In APCA terms that is Lc −75.4 for white and Lc 34.2 for black.
- What is the RGB value of forestgreen?
- ForestGreen is rgb(34, 139, 34): red 34, green 139 and blue 34 on the 0 to 255 scale, or 13.3%, 54.5% and 13.3%. As a decimal integer it is 2263842.
Last reviewed by Arielton Oberek.