# Green Color Code: #008000 Hex, RGB & Palettes

The CSS green reference is #008000, rgb(0, 128, 0), or hsl(120, 100%, 25.1%). Brand shades may differ. HEX and RGB encode the same sRGB reference; HSL is rounded to two decimals. These are screen values, not a CMYK print specification.

## Tints and shades

Illustrative mixes with white or black in encoded sRGB channels, not a perceptually uniform scale.

| Shade | HEX | RGB | HSL | Black text contrast | White text contrast |
| --- | --- | --- | --- | --- | --- |
| Tint 80% | #CCE6CC | rgb(204, 230, 204) | hsl(120, 34.21%, 85.1%) | 15.76:1 | 1.33:1 |
| Tint 40% | #66B366 | rgb(102, 179, 102) | hsl(120, 33.62%, 55.1%) | 8.20:1 | 2.56:1 |
| Reference | #008000 | rgb(0, 128, 0) | hsl(120, 100%, 25.1%) | 4.09:1 | 5.14:1 |
| Shade 25% | #006000 | rgb(0, 96, 0) | hsl(120, 100%, 18.82%) | 2.67:1 | 7.86:1 |
| Shade 50% | #004000 | rgb(0, 64, 0) | hsl(120, 100%, 12.55%) | 1.73:1 | 12.12:1 |

## Text contrast

AA ordinary text requires at least 4.5:1; large text requires at least 3:1. Large text is at least 18pt, or 14pt bold. Use unrounded ratios for decisions. Color pairs alone cannot certify accessibility; review criteria, states, context, and exceptions.

CSS green is #008000; the brighter #00FF00 is CSS lime. These values have substantially different contrast behavior.

## How to use green in product design

Green can indicate a completed operation when the interface also states the result. Treat completion as a product state with a label and next step, not just a color treatment.

### A UI example to try

An import summary can display “Imported 24 rows” in a success panel. Include skipped-row details and a review link so the color does not hide a partial failure.

### Work through a real screen

Use a completed-state row as the specimen: state the outcome in words and provide the next action if one exists. Do not make every successful response a large green panel; the amount of emphasis should fit the task. Review green alongside error and pending states so the full set remains understandable.

### Compare nearby colors by purpose

Teal can be a distinct brand accent while lime can be a brighter highlight. If green already means success in the product, document when those neighboring hues are decorative and when they carry state. Avoid teaching conflicting meanings through adjacent screens.

1. Choose a foreground, surface, accent, or status role and name a semantic token after its purpose.
2. Test the actual pair, text size, interaction states, and themes.
3. Document the approved value and companion colors. Keep labels and non-color cues for states.

## CSS palette

Illustrative numeric tokens; connect tested pairs to semantic roles.

```css
:root {
  --green-100: #CCE6CC;
  --green-300: #66B366;
  --green-500: #008000;
  --green-700: #006000;
  --green-900: #004000;
}
```

## What is the HEX code for green?

The CSS named color green is #008000. Use a documented brand token when you mean another shade.

## Is green accessible?

A color alone cannot pass or fail accessibility. Evaluate the pair, content size, interaction state, and meaning in the complete interface.

## Related colors

- [teal color codes](https://designproject.io/resources/colors/teal/)

- [lime color codes](https://designproject.io/resources/colors/lime/)

- [cyan color codes](https://designproject.io/resources/colors/cyan/)

## Sources and next steps

By The Design Project. UI examples and generated scales are illustrative.

- [MDN CSS named colors](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/named-color)
- [W3C contrast guidance](https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html)
- [UI color palette guide](https://designproject.io/resources/guides/create-ui-color-palette/)
- [Semantic color tokens](https://designproject.io/resources/guides/create-semantic-color-tokens/)
- [Color contrast checker](https://designproject.io/resources/guides/check-color-contrast/)
- [Design glossary](https://designproject.io/resources/glossary/)

Canonical: https://designproject.io/resources/colors/green/

## Keep learning

- [How to create a UI color palette, step by step](https://designproject.io/resources/guides/create-ui-color-palette/)
- [Product design glossary: 44 terms explained](https://designproject.io/resources/glossary/)
- [How to create semantic color tokens for UI](https://designproject.io/resources/guides/create-semantic-color-tokens/)
