Skip to content

Basic HTML and CSS color

Lime #00FF00

Lime (CSS keyword lime) has the hex code #00FF00 and the RGB value rgb(0, 255, 0): a very light, vivid green.

Lime#00FF00

Lime (#00ff00) is the pure sRGB green primary and one of the 16 original HTML colors. In X11 this value was simply called green, which is why CSS green is a darker color.

Color codes for Lime

Color codes for Lime
CSS keywordlime
HEX#00FF00
RGBrgb(0, 255, 0)
HSLhsl(120, 100%, 50%)
HWBhwb(120 0% 0%)
OKLCHoklch(86.6% 0.295 142.5)
CMYK (naive, no ICC profile)cmyk(100%, 0%, 100%, 0%)
Decimal65,280
Hue familyGreens

Contrast and accessibility

On lime, black text has a contrast ratio of 15.30:1 and passes AAA at any text size; white text reaches 1.37: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 lime15.30:1PassPassPassPass86.5
White text on lime1.37:1FailFailFailFail−19.6
Lime text on white1.37:1FailFailFailFail17.1
Lime text on black15.30:1PassPassPassPass−86.5

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #0dff0d
  2. 15%
    #26ff26
  3. 25%
    #40ff40
  4. 35%
    #59ff59
  5. 45%
    #73ff73
  6. 55%
    #8cff8c
  7. 65%
    #a6ffa6
  8. 75%
    #bfffbf
  9. 85%
    #d9ffd9
  10. 95%
    #f2fff2

Shades (mixed with black)

  1. 5%
    #00f200
  2. 15%
    #00d900
  3. 25%
    #00bf00
  4. 35%
    #00a600
  5. 45%
    #008c00
  6. 55%
    #007300
  7. 65%
    #005900
  8. 75%
    #004000
  9. 85%
    #002600
  10. 95%
    #000d00

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, lime's complementary color is #FFB1FF (close to plum), its analogous colors are #D7DF00 and #00FAC6, and its triadic partners are #B5D4FF and #FFBBB7. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#ffb1ff
Analogous−30°, +30°#d7df00#00fac6
Triadic+120°, +240°#b5d4ff#ffbbb7
Split-complementary+150°, +210°#d4c8ff#ffb5da

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?

Lime 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.

Nearest CSS named colors

Nearest CSS named colors
ColorHEXΔE OK
lawngreen#7cfc004.7
chartreuse#7fff005.0
springgreen#00ff7f7.2

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
lime-400#9ae6008.9
green-400#05df7212.0
lime-300#bbf45112.3

Code snippets

CSS
.element {
  color: lime;
  background-color: #00ff00;
  border-color: rgb(0 255 0);
  outline-color: oklch(86.6% 0.295 142.5);
}
Tailwind CSS
<div class="bg-[#00ff00] text-black">...</div>

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

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

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

const lime = Color(0xFF00FF00);
Android XML
<!-- res/values/colors.xml -->
<color name="lime">#00FF00</color>

Frequently asked questions

What is the hex code for lime?
The hex code for lime is #00FF00. The same color is rgb(0, 255, 0), hsl(120, 100%, 50%) and oklch(86.6% 0.295 142.5), and in CSS you can also write the keyword lime directly.
Is lime a warm or cool color?
Lime 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 lime?
Rotating the hue in OKLCH while keeping lightness and chroma, lime's complementary color is #FFB1FF (close to plum), its analogous colors are #D7DF00 and #00FAC6, and its triadic partners are #B5D4FF and #FFBBB7. For text on top, black gives the higher contrast.
Can you use white text on lime?
White text on lime has a contrast ratio of 1.37:1, which fails AA even for large text under WCAG 2.2. Black text reaches 15.30:1 and passes both AA and AAA. In APCA terms that is Lc −19.6 for white and Lc 86.5 for black.
What is the RGB value of lime?
Lime is rgb(0, 255, 0): red 0, green 255 and blue 0 on the 0 to 255 scale, or 0.0%, 100.0% and 0.0%. As a decimal integer it is 65280.

Last reviewed by Arielton Oberek.