BrandToPrompt

PHP Design System: Functional Developer-Friendly UI

Visit Site

Explore PHP's design system - muted colors, consistent typography, and clear spacing. Build developer-friendly interfaces with PHP's visual language.

6 min read1,062 words

Brand Identity

Color Palette

Primary
Secondary

Typography

Primary Font
Fira Sans

Design Style

Style
functional and developer-focused with muted tones and friendly rounded shapes
Visual Density
consistent 8px spacing scale with predictable layout rhythm
Border Style
mixed: 4px inputs, 8px forms, 30px pill buttons

Full Analysis

PHP Brand Design System Deep-Dive

1. Brand Overview

PHP’s official site is an odd mix of legacy practicality and modernized polish. This isn’t a startup trying to look “cool,” nor is it a purely academic documentation site. It’s a brand that’s been around for decades, serving millions of developers, and it’s slowly evolved its interface to feel fresher without alienating the existing audience.

When you land on php.net, the vibe is functional but not sterile. There’s a primary dark blue-purple (#4F5B93) that anchors everything — it’s professional, trustworthy, not screaming for attention. The magenta accents (#AE508D, #CF82B1) inject just enough personality without undermining the seriousness of the platform. You can tell they’ve kept the design language consistent with the PHP elephant logo’s recognizable aesthetic — rounded, approachable shapes, but clear hierarchy.

This is for developers. The typography is straightforward, the spacing is predictable, and the components are built for clarity over decoration. The site is fully responsive, but it’s not chasing cutting-edge motion or complex layouts. It’s a design system that prioritizes quick scanning, easy navigation, and a solid visual rhythm.

What I like: they’ve embraced a consistent 8px spacing scale, a predictable palette, and a single font family (Fira Sans) across headings, links, buttons, and captions. That keeps the UI clean and uniform.

What’s interesting: even with a tech-heavy audience, they’ve avoided the hyper-minimalist black-and-white approach you see in some dev tools. Instead, there’s a light touch of friendly color and rounded buttons — it feels welcoming while still being professional.


2. Color System

2.1 Primary Colors

The primary brand color is #4F5B93 (dark blue). This is a muted, slightly desaturated blue-purple, which communicates stability and authority without the corporate stiffness of pure navy. Compared to competitors (Python’s bright yellow/blue, Ruby’s deep red), PHP’s palette is more subdued and calming — perfect for long hours reading documentation.

Secondary in semantic terms is transparent (rgba(0, 0, 0, 0)), essentially “no color” for backgrounds in certain button states.

2.2 Complete Palette

Here’s every color extracted from the site:

Color NameHexRoleUsage
Primary Dark Blue#4F5B93PrimaryMain brand color, hero primary button
Blue Medium#336699AccentLink color, borders
Light Gray#CCCCCCNeutralIcons, secondary text, dividers
Dark Magenta#793862AccentTitles, dotted header borders
Light Blue#C3D3F8BackgroundLight backgrounds
White#FFFFFFNeutralText on dark backgrounds, button text
Very Light Blue#DBE1FFAccentLink text
Muted Periwinkle#90A0D0AccentBackgrounds, low contrast surfaces
Medium Magenta#AE508DAccentHover/focus states
Very Pale Blue#F0F2FFHoverHover/focus backgrounds
Pale Blue Tint#F1F3FFHoverHover/focus backgrounds
Soft Lavender#94A3EDHoverHover/focus outlines
Dark Gray#666666NeutralButton text
CSS Var — Background Text#CCCNeutralBackground text color
CSS Var — Content Text#333NeutralBody text
CSS Var — Light Magenta#CF82B1AccentHover link color
CSS Var — Light Blue#E2E4EFNeutralBackground surfaces
CSS Var — Medium Blue#7A86B8AccentSecondary elements

2.3 Color Relationships

The palette is cool-heavy, leaning on blues and purples. The magenta accents pop against the muted primary — good for drawing attention to interactive states. Accessibility-wise, #4F5B93 on white is safe; white text on #4F5B93 also passes WCAG AA for large text. The lighter blues (#DBE1FF, #C3D3F8) are fine for backgrounds but would fail for small text contrast — they’re used carefully.

Dark mode? No native dark mode here. The palette is light-first, with dark blue as the strongest element.

2.4 Usage Guide

  • Primary buttons: #4F5B93 with white text.
  • Links on dark backgrounds: #DBE1FF, hover to magenta (#CF82B1).
  • Dividers: #CCCCCC or #793862 dotted.
  • Avoid using #AE508D for text — it’s for hover/focus states.
  • Don’t put small text on #C3D3F8 or #DBE1FF — contrast is too low.

3. Typography

3.1 Font Families

Everything runs on Fira Sans, with a long fallback stack:

Fira Sans, Source Sans Pro, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji

No Google Fonts load — it’s likely locally hosted. No variable fonts.

3.2 Type Scale

ElementFontSizeWeightLine Height
Heading-1Fira Sans160px (10rem)4000.70
Heading-1Fira Sans24px (1.5rem)4002.00
LinkFira Sans24px (1.5rem)4002.00
ButtonFira Sans20px (1.25rem)4001.20
Heading-1Fira Sans18px (1.13rem)4001.50
LinkFira Sans18px (1.13rem)4001.33
LinkFira Sans16px (1rem)4001.50
ButtonFira Sans16px (1rem)400null
Heading-1Fira Sans16px (1rem)4001.50
LinkFira Sans14px (0.88rem)4001.71
CaptionFira Sans14px (0.88rem)4001.71
ButtonFira Sans14px (0.88rem)4001.71

3.3 Hierarchy

They mix enormous hero headline sizes (160px) with very tight line height (0.70) — that’s a bold move for splash impact. Most content headings settle into 24px, with generous line height (2.0) for readability. Links match heading sizes in some contexts — interesting for keeping navigation prominent.

Body text isn’t explicitly listed here, but captions and smaller links at 14px form the low end of the scale. The weight is consistently 400 — no bold weights, which keeps the tone softer.


4. Spacing & Layout

4.1 Spacing Scale

Base grid: 8px.

Values:

pxremCountNotes
1px0.06rem156Hairline borders, fine dividers
8px0.5rem33Small padding
12px0.75rem9Button vertical padding
16px1rem15Standard padding
18px1.13rem4Rare — maybe icon alignment
24px1.5rem265Section padding, major gaps
28px1.75rem1Specific layout tweak
48px3rem25Hero section gap
60px3.75rem2Very large spacing — likely banner padding

4.2 Layout

Breakpoints:

425px, 465px, 480px, 540px, 760px, 767px, 768px, 784px, 979px, 980px, 992px, 1024px, 1200px, 1500px, 1548px.

Unusual: multiple points around 760–784px — probably for tablet nuances. 980/992px is a legacy desktop breakpoint.


5. Visual Elements

Border Radius

ValueUsage
4pxkbd elements
8pxforms, buttons, modals
16pxdialog
30pxbuttons (pill-like)
32pxbuttons (full pill)

They mix small radius for inputs with large pill styles for hero buttons.

Shadows

Two light shadows:

  • rgba(0,0,0,0.2) 0px 2px 4px 0px
  • rgba(0,0,0,0.1) 0px 4px 4px 0px

Used sparingly — mostly flat design, shadows for subtle depth.

Borders

Heavy use of 0px 0px 1px dotted or solid for underlines and dividers. Colors vary: #336699, #793862, #CCCCCC.


6. Components

6.1 Buttons

Navbar Search Button (.navbar__search-button):

  • Default: bg #404F82, text #B9C3F4, padding 8px, radius 8px, border 1px solid #6A78BE.
  • Hover/focus: outline none.

Hero Primary Button (.hero__btn--primary):

  • Default: bg #4F5B93, text white, padding 16px 32px, radius 30px, no border.
  • Hover: bg var(--dark-magenta-color), scale 1.1.
  • Focus: same as hover.

Hero Secondary Button (.hero__btn--secondary):

  • Default: transparent bg, text #B8C0E9, padding 16px 32px, radius 30px, border 1px solid #6775AD.
  • Hover/focus: bg var(--dark-magenta-color), text white, scale 1.1.

Multiple variants:

  • #CCCCCC default, hover magenta.
  • #DBE1FF default, hover magenta.
  • White default/hover.
  • #B8C0E9 default, hover white.
  • #336699 default, hover magenta.
  • #E6E6E6 default, hover magenta.

No underlines, hover changes color.

6.3 Forms

No text input styles extracted — likely default browser with minimal overrides.

6.4 Cards

No explicit card component — layout relies on background sections.


7. Design Tokens

:root {
  /* Colors */
  --color-primary-dark-blue: #4F5B93;
  --color-blue-medium: #336699;
  --color-light-gray: #CCCCCC;
  --color-dark-magenta: #793862;
  --color-light-blue: #C3D3F8;
  --color-white: #FFFFFF;
  --color-very-light-blue: #DBE1FF;
  --color-muted-periwinkle: #90A0D0;
  --color-medium-magenta: #AE508D;
  --color-very-pale-blue: #F0F2FF;
  --color-pale-blue-tint: #F1F3FF;
  --color-soft-lavender: #94A3ED;
  --color-dark-gray: #666666;
  --color-background-text: #CCC;
  --color-content-text: #333;
  --color-light-magenta: #CF82B1;
  --color-light-blue-var: #E2E4EF;
  --color-medium-blue-var: #7A86B8;

  /* Typography */
  --font-family-primary: "Fira Sans", "Source Sans Pro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";

  /* Spacing */
  --space-1: 1px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-18: 18px;
  --space-24: 24px;
  --space-28: 28px;
  --space-48: 48px;
  --space-60: 60px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill-30: 30px;
  --radius-pill-32: 32px;

  /* Shadows */
  --shadow-light-1: rgba(0,0,0,0.2) 0px 2px 4px 0px;
  --shadow-light-2: rgba(0,0,0,0.1) 0px 4px 4px 0px;
}

8. AI Coding Assistant Prompt

# PHP Design System Specification

You are a PHP design expert. Build UIs matching their visual language exactly.

## Brand Context
PHP’s design language is functional, developer-focused, and friendly. It uses a muted blue-purple primary with magenta accents, consistent 8px spacing, and a single sans-serif family across all UI. Rounded pill buttons highlight calls to action.

## Color Palette
- Primary Dark Blue: #4F5B93 — Primary buttons, hero sections
- Blue Medium: #336699 — Links, borders
- Light Gray: #CCCCCC — Secondary text, icons, dividers
- Dark Magenta: #793862 — Titles, dotted header borders
- Light Blue: #C3D3F8 — Background panels
- White: #FFFFFF — Text on dark backgrounds
- Very Light Blue: #DBE1FF — Link text on dark backgrounds
- Muted Periwinkle: #90A0D0 — Low-contrast backgrounds
- Medium Magenta: #AE508D — Hover/focus states
- Very Pale Blue: #F0F2FF — Hover backgrounds
- Pale Blue Tint: #F1F3FF — Hover backgrounds
- Soft Lavender: #94A3ED — Hover outlines
- Dark Gray: #666666 — Button text
- Background Text: #CCC — Background text
- Content Text: #333 — Body text
- Light Magenta: #CF82B1 — Hover link color
- Light Blue Var: #E2E4EF — Background surfaces
- Medium Blue Var: #7A86B8 — Secondary elements

## Typography
Font Family: "Fira Sans", "Source Sans Pro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"

| Element | Size | Weight | Line Height | Use |
|---------|------|--------|-------------|-----|
| H1 Hero | 160px | 400 | 0.70 | Main splash text |
| H1 | 24px | 400 | 2.00 | Section headings |
| Link Large | 24px | 400 | 2.00 | Prominent nav |
| Button Large | 20px | 400 | 1.20 | Hero CTA |
| H1 Small | 18px | 400 | 1.50 | Subheadings |
| Link Med | 18px | 400 | 1.33 | Secondary nav |
| Link Base | 16px | 400 | 1.50 | Body links |
| Button Base | 16px | 400 | - | Standard buttons |
| Caption | 14px | 400 | 1.71 | Metadata |
| Button Small | 14px | 400 | 1.71 | Compact buttons |

## Spacing & Grid
Base: 8px. Scale: 1px, 8px, 12px, 16px, 18px, 24px, 28px, 48px, 60px.

Map:
- Button padding: 8px / 16px 32px
- Section gaps: 24px, 48px
- Hero padding: 60px

## Border Radius
- sm: 4px — kbd elements
- md: 8px — forms, buttons
- lg: 16px — dialogs
- pill-30: 30px — hero buttons
- pill-32: 32px — pill buttons

## Shadows & Depth
- rgba(0,0,0,0.2) 0px 2px 4px 0px
- rgba(0,0,0,0.1) 0px 4px 4px 0px

## Component Specifications

### Primary Button (Hero)
Default:
- background: #4F5B93
- color: #FFFFFF
- padding: 16px 32px
- border-radius: 30px
- border: none
Hover:
- background: var(--dark-magenta-color)
- transform: scale(1.1)
Focus: same as hover
Active: outline: none

### Secondary Button (Hero)
Default:
- background: transparent
- color: #B8C0E9
- padding: 16px 32px
- border-radius: 30px
- border: 1px solid #6775AD
Hover/Focus:
- background: var(--dark-magenta-color)
- color: #FFFFFF
- transform: scale(1.1)

### Navbar Search Button
Default:
- background: #404F82
- color: #B9C3F4
- padding: 8px
- border-radius: 8px
- border: 1px solid #6A78BE

### Navigation Links
Default color varies by context; hover typically changes to #CF82B1 or white depending on background.

## Layout & Responsive Rules
Breakpoints: 425px, 465px, 480px, 540px, 760px, 767px, 768px, 784px, 979px, 980px, 992px, 1024px, 1200px, 1500px, 1548px.

## Interaction Rules
- Transition: transform/background 150ms ease
- Focus: no outline, color change to hover state
- Hover: scale 1.1 for hero buttons

## DO List
- Use only defined hex values
- Keep spacing multiples of 8px
- Maintain consistent font family
- Use magenta only for hover/focus
- Keep buttons rounded as per spec

## DON'T List
- Don’t introduce new colors
- Don’t mix sharp and pill corners arbitrarily
- Don’t use heavy shadows
- Don’t reduce line height below spec

## Code Examples

### Primary Button
```css
.btn-primary {
  background: #4F5B93;
  color: #FFFFFF;
  padding: 16px 32px;
  border-radius: 30px;
  font-size: 20px;
  font-weight: 400;
  border: none;
  transition: background 150ms ease, transform 150ms ease;
}
.btn-primary:hover, .btn-primary:focus {
  background: #AE508D;
  transform: scale(1.1);
}
```

### Secondary Button
```css
.btn-secondary {
  background: transparent;
  color: #B8C0E9;
  padding: 16px 32px;
  border-radius: 30px;
  font-size: 20px;
  font-weight: 400;
  border: 1px solid #6775AD;
  transition: background 150ms ease, transform 150ms ease;
}
.btn-secondary:hover, .btn-secondary:focus {
  background: #AE508D;
  color: #FFFFFF;
  transform: scale(1.1);
}
```

### Input Field
```css
.input {
  border: 1px solid #6A78BE;
  border-radius: 8px;
  padding: 8px;
  font-size: 16px;
  font-family: var(--font-family-primary);
}
.input:focus {
  border-color: #AE508D;
  outline: none;
}
```

9. Summary

TL;DR — PHP’s design system is developer-friendly, muted in tone, and highly consistent. One font, one spacing scale, a restrained palette of blues and magentas, and rounded buttons make it approachable but professional.

Brand Keywords:

  • developer-focused
  • muted-tech
  • friendly-functional
  • pill-button-loyalty