Back to all topics

Color, layout and visual design helpers

Design tools make numeric choices visible: contrast, gradients, spacing, shadows and aspect ratios. Use them to explore a design, then verify it in the actual layout. Visual appearance depends on size, background, display and the people using the interface.

Suggested workflow

  1. Define the context: foreground and background colors, dimensions or output format.
  2. Adjust the values and compare the result with the task you are designing for.
  3. Copy the generated values and check the final interface, including keyboard use and readable text.

What to check

A color preview alone does not establish accessibility. Contrast requirements depend on text size and purpose. Simulations illustrate possible differences in perception without representing every individual experience.

Color Palette

Generate six swatches from one base: original, lighter, darker, complement and two analogous colors at hue offsets of ±30°. Every swatch shows a six-digit HEX value with its own copy button.

Suggested workflow

Choose #FF0000 for #FF0000, #FF8080, #990000, #00FFFF, #FF0080 and #FF8000 in order. Copy either the base or any swatch; gray input still keeps all six named cards.

What to check

Lightening adds 0.25 to HSL lightness and darkening subtracts 0.20, clamped to 0–1. The complement rotates hue by 180°. Gray hue variants can coincide; check foreground/background pairs with the contrast checker.

Example · Result

Input

#ff0000

Output

["#FF0000","#FF8080","#990000","#00FFFF","#FF0080","#FF8000"]
Open tool · Color Palette

Gradient Generator

Choose two six-digit HEX colors and a direction from 0 to 360° to preview a linear gradient. Copy supplies a complete background: linear-gradient(...) declaration for CSS.

Suggested workflow

Choose #FF0000, #0000FF and 90° for linear-gradient(90deg, #ff0000, #0000ff). Paste the copied declaration into a stylesheet. At 0° the direction is upward; at 90° it points right.

What to check

Endpoints are opaque #RRGGBB colors. Angles increase clockwise in 1° steps; 360° and 0° point in the same direction. The browser blends colors along the gradient line.

Example · Output

Input

{"angle":90,"from":"#ff0000","to":"#0000ff"}

Output

background: linear-gradient(90deg, #ff0000, #0000ff);
Open tool · Gradient Generator

Box Shadow

Create one outer box shadow with horizontal and vertical offsets, blur, spread, color and opacity. The preview updates with each control, and Copy takes the complete box-shadow declaration.

Suggested workflow

Set x to −4, y to 8, blur to 24 and spread to −2, then choose #FF0000 at 50% opacity. The result is -4px 8px 24px -2px rgba(255, 0, 0, 0.50).

What to check

Offsets range from −50 to 50 px, blur from 0 to 100 px, spread from −30 to 30 px and opacity from 0 to 100%. Negative spread contracts the shadow. Colors use six-digit HEX and lengths use px.

Example · Output

Input

{"x":-4,"y":8,"blur":24,"spread":-2,"color":"#ff0000","opacity":50}

Output

box-shadow: -4px 8px 24px -2px rgba(255, 0, 0, 0.50);
Open tool · Box Shadow

Border Radius

Adjust the four physical corners independently from 0 to 120 px. A live square previews the result, and the four-value border-radius declaration is ready to copy into a stylesheet.

Suggested workflow

Set top left, top right, bottom right and bottom left to 0, 20, 40 and 60. The output is border-radius: 0px 20px 40px 60px;. The average button sets all four once to the rounded mean: 30 px here.

What to check

Values follow physical corners in the same order on RTL pages. The browser scales overlapping corner curves proportionally to fit the box; the preview square measures 160 × 160 px.

Example · Output

Input

[0,20,40,60]

Output

border-radius: 0px 20px 40px 60px;
Open tool · Border Radius

Aspect Ratio

Reduce integer image or video dimensions to an exact ratio, then scale by a target width or height to the nearest whole pixel.

Suggested workflow

Enter 1920 × 1080 for 16:9. Set the target width to 1280 for 1280 × 720, or independently set a target height. Switch to the portrait preset when needed and copy the exact reduced ratio.

What to check

Dimensions are positive decimal integers up to 9007199254740991 per side. The greatest common divisor gives the exact ratio. Scaling rounds to whole pixels; a zero or unsafe rounded dimension produces an error.

Example · Target width (pixels)

Input

{"width":1920,"height":1080,"targetWidth":1280}

Output

{"ratio":"16:9","width":1280,"height":720}
Open tool · Aspect Ratio

Contrast Checker

Calculate WCAG contrast from text and background relative luminance, with separate AA and AAA results for normal and large text.

Suggested workflow

Choose #000000 and #FFFFFF for 21:1, then swap them to confirm that the ratio stays the same. Normal text needs 4.5:1 for AA and 7:1 for AAA. Copy the ratio into a design review record.

What to check

Large text needs 3:1 for AA or 4.5:1 for AAA: at least 18pt, or 14pt bold. Thresholds use the unrounded ratio. Composite transparent colors over their background first and check the positions covered by text on gradients.

Example · Contrast ratio

Input

{"foreground":"#000000","background":"#FFFFFF"}

Output

21.0000:1
Open tool · Contrast Checker

ASCII Table

ASCII has 128 code points from 0 to 127. Uppercase A is decimal 65 and lowercase a is 97; LF is 10, CR is 13, space is 32 and DEL is 127. Each card shows decimal, hexadecimal and seven-bit binary representations.

Suggested workflow

Enter 0x41 to find A; 65, U+0041 and the seven-bit binary example select the same character. Choose literal, escape or numeric copying. Single letters preserve case, char:7 finds the digit character 7, and HT or TAB finds a tab. Group filters show control or printable characters.

What to check

Lookup covers seven-bit ASCII with queries up to 128 UTF-16 units. Code points above 127 return an empty result. Raw control-character clipboard behavior depends on the operating system; NUL can be truncated. Choose hexadecimal escapes or numeric codes for a visible representation to save or share.

Example · Character lookup

Input

0x41

Output

A · 65 · 0x41 · 1000001
Open tool · ASCII Table

Color Converter

Translate opaque sRGB colors between HEX, RGB, HSL and HSV when moving between a stylesheet, a design file and a color picker.

Suggested workflow

Enter #0F8 to expand it to #00FF88, or hsv(360, 100%, 100%) to get #FF0000. Edit any of the four fields, including comma-separated numeric triples. Copy the required format, or choose another color with the picker or random button.

What to check

RGB channels are integers from 0–255; HSL/HSV percentages run from 0–100 and hue wraps at 360°. Six decimal places preserve eight-bit color round trips. HSV is a design-software representation rather than a CSS color function.

Example · HSV

Input

hsv(360, 100%, 100%)

Output

#FF0000
Open tool · Color Converter

Citation Gen

Create basic web-page and book entries in APA 7, MLA 9 and explicitly identified GB/T 7714—2015 as plain text.

Suggested workflow

Choose a source type and enter a title and authors already arranged for the style. Web pages require a full URL and access date; books require a place, publisher and four-digit year. Load examples, copy each style or clear. Missing authors move the title first; APA uses n.d. without a year.

What to check

Each field allows 2000 characters. URLs accept HTTP/HTTPS without credentials and dates are strictly checked. Author order, title case and pasted italics follow the target requirements. Journal articles, chapters, editions and multi-author abbreviations need their additional rules. GB/T 2025 is effective; use the edition required for submission.

Example · Web page

Input

{"kind":"web","author":"Example Team","year":"2026","title":"Guide","publisher":"","website":"Example","place":"","url":"https://example.com/guide","accessed":"2026-11-17"}

Output

Example Team. (2026). Guide. Example. https://example.com/guide
Open tool · Citation Gen

Featured articles

CSS color formats and WCAG contrast: from HEX conversion to the 4.5:1 threshold