Design and CSS
Convert colors, check WCAG contrast, build OKLCH shade scales and modular type scales, and translate CSS units, all privately in your browser.
11 tools Run on the CSS Unit, Color and Structured Data engines
Color
CSS and Mobile Units
JSON and Structured Data
About Design and CSS
Colour and units, the two things that follow a design from a mockup into code. Colour conversion moves between HEX, RGB, HSL, HSV, OKLCH and CMYK; the contrast checker scores a pair against the WCAG thresholds and says which level it reaches.
Contrast is the one with a right answer. Normal body text needs 4.5:1 to pass AA and large text needs 3:1, so a pairing that looks fine on your monitor can still fail for someone else. The checker gives the ratio and the grade rather than a verdict, so you can see how far off you are.
The unit converters handle px to rem and px to dp, which are the same arithmetic against different base sizes: rem depends on the root font size a user may have changed, dp on the screen's density. Both are here because the conversion is trivial and getting the base wrong is not.
Guides
How the design and css calculations work, and where they go wrong.
- Aspect Ratios Explained: 16:9, Resizing, and Math
- CSS Minifier: Shrink or Beautify Stylesheets
- DP, SP, and PX: Android and iOS Density Units
- How a Colorblind Simulator Compares a Palette
- How Color Formats Work: HEX, RGB, HSL, and OKLCH
- How to Build a 50 to 950 OKLCH Color Scale
- How to Build a Modular Type Scale in CSS
- How to Build an OKLCH CSS Gradient
- How to Extract Colors from an Image
- PX, REM, and EM: How CSS Units Relate and Convert
- WCAG Contrast Explained: AA, AAA, and Readable Color