# Web Converter for Raycast

URL: https://www.raycast.com/nielsvanrijn/web-converter

> Convert rem, px and pt, and HEX, RGB(A), HSL(A) and OKLCH colors, with the closest Tailwind CSS color and spacing values.

- Install: raycast://extensions/nielsvanrijn/web-converter
- Author: [Niels](https://www.raycast.com/nielsvanrijn)
- Installs: 9,305
- Platforms: macOS, Windows
- Categories: Developer Tools, Productivity, Web
- Updated: 2026-11-17
- Source: https://github.com/raycast/extensions/tree/8d846393b506d23c5d9ebae29bb35e3dc7653829/extensions/convert/

## Commands

- **Convert Unit**: Converts everything web related: rem, px, pt, hex, hex (with opacity), rgb, rgba, hsl, hsla, oklch and shows the closest Tailwind CSS color.

## README

### Web Converter

Convert common web units and color formats in Raycast. Type a value in the search bar and copy any matching conversion from the list.

#### Spacing

Converts between **rem**, **px**, and **pt**, and maps values to the nearest [Tailwind CSS spacing scale](https://tailwindcss.com/docs/customizing-spacing) (v3.3.2).

| Input example | Outputs                                                                 |
| ------------- | ----------------------------------------------------------------------- |
| `16px`        | rem, pt, Tailwind spacing (e.g. `4`) or arbitrary value (e.g. `[16px]`) |
| `1rem`        | px, pt, Tailwind spacing                                                |
| `12pt`        | rem, px                                                                 |

**Base pixel size:** rem ↔ px conversions use a configurable base font size (default **16px**). Change it in extension preferences under **Base PX Value**.

#### Colors

Converts between **hex**, **rgb**, **hsl**, and **oklch**, including alpha/opacity where supported. For opaque colors, the extension also suggests the closest **Tailwind CSS** palette color.

##### Supported inputs

**Hex**

- `#006699` — 6-digit
- `#069` — 3-digit shorthand
- `#00669980` — 8-digit with alpha

**RGB / RGBA** (comma-separated)

- `rgb(0, 102, 153)`
- `rgba(0, 102, 153, 0.5)`

**HSL / HSLA** (comma- or space-separated, modern CSS syntax)

- `hsl(200, 100%, 30%)`
- `hsl(200 100% 30%)`
- `hsl(200 100% 30% / 0.5)`
- `hsl(200 100% 30% / 50%)` — alpha as percentage
- `hsla(200, 100%, 30%, 0.5)`

**OKLCH**

- `oklch(0.45 0.12 240)`
- `oklch(45% 0.12 240)` — lightness as percentage

##### Outputs

Depending on the input, you may see:

- hex / hexa
- rgb / rgba
- hsl / hsla
- oklch
- closest Tailwind color (name or hex)

Click any result to copy it to the clipboard.

#### Usage

1. Open Raycast and run **Convert Unit**.
2. Type a spacing or color value (e.g. `22px`, `#006699`, `hsl(200 100% 30%)`).
3. Pick a conversion from the list and copy it.

#### Platforms

macOS and Windows.
