AiLounge Tools

Color & CSS Style Tools

Convert HEX/RGB/HSL, compute WCAG contrast, and generate controlled gradient and box-shadow CSS entirely in your browser. No uploads.Processed locally · no uploads

From a colour input to copyable CSS

1. Convert a colour. Open Color conversion, enter #176b50 in color, choose all as target and run. The output gives #176b50, rgb(23, 107, 80) and hsl(160.7, 64.6%, 25.5%) plus the documented error tolerances.

2. Check contrast. Open Contrast, set foreground #000000, background #ffffff and alpha to 50. The tool first composites the translucent foreground over your chosen opaque background into #808080, then reports about 3.98:1. Normal-text AA needs ≥4.5:1; large text (≥18pt/24px regular or ≥14pt/~18.66px bold) AA needs ≥3:1. The premise is solid opaque text on a solid opaque background — images, gradients and translucent overlays are out of scope.

3. Build a gradient. angle accepts only 0, 90 or 180; fill color0/position0, color1/position1 and up to 5 strictly increasing stops. #176b50 0% with #e8f3ec 100% at 90 degrees yields background-image: linear-gradient(90deg, #176b50 0%, #e8f3ec 100%);.

4. Build a shadow. Tick inset and supply offsets, blur, spread and a colour to get box-shadow: inset 2px 4px 8px 0px #17211c;. The preview and the copied text come from the same controlled serializer, covered by snapshot and parse-verification tests.

5. Share a palette. The share button writes only public colour values into the URL (?lang=&tool=&palette=), never document text. Pasting raw CSS or strings containing url(, </style>, expression( or @import is rejected with a clear error.

Open the tool