Social Media Icons: Sizing, Colors, and Best Practices in 2026
Everything you need to know about implementing social media SVG icons, including official brand colors, hover states, and spacing guidelines.
Adding social media icons to a website footer or author bio is a standard requirement for almost every web project. However, implementing them incorrectly can result in a messy UI, misaligned SVGs, and even trademark violations if you alter a brand’s logo too drastically.
Here is the 2026 guide to properly sizing, coloring, and implementing social media SVG icons.
The Official Brand Colors
When implementing social icons, you generally have two design choices:
- Use the official brand colors (great for drawing attention).
- Use a monochrome palette that matches your site’s theme (great for clean, minimalist footers).
If you choose to use official brand colors, you must use the exact hex codes. Here are the current standard values:
- X (formerly Twitter):
#000000(Black) or#FFFFFF(White) - LinkedIn:
#0A66C2 - Instagram: A gradient is standard, but for a solid fallback:
#E1306C - YouTube:
#FF0000 - Facebook:
#1877F2 - TikTok:
#000000(often paired with cyan#69C9D0and red#EE1D52accents) - GitHub:
#181717 - Discord:
#5865F2
CSS Implementation: The “Monochrome to Color” Hover Effect
The most popular and elegant way to implement social icons is to keep them monochrome (e.g., gray) by default, and have them transition to their official brand color upon hover.
Because SVGs can be targeted by CSS, this is incredibly easy to do if you use fill="currentColor".
<div class="social-links">
<!-- X (Twitter) -->
<a href="#" class="social-icon brand-x" aria-label="Follow us on X">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="..."/></svg>
</a>
<!-- LinkedIn -->
<a href="#" class="social-icon brand-linkedin" aria-label="Follow us on LinkedIn">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="..."/></svg>
</a>
</div>
.social-icon {
color: #9CA3AF; /* Default gray */
transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
display: inline-block;
width: 24px;
height: 24px;
}
.social-icon:hover {
transform: translateY(-2px); /* Slight lift effect */
}
/* Brand specific hover colors */
.social-icon.brand-x:hover { color: #000000; }
.social-icon.brand-linkedin:hover { color: #0A66C2; }
/* Note: For dark mode, X should hover to #FFFFFF */
Sizing and Alignment
Social media icons often have different native aspect ratios (e.g., the YouTube play button is wider than the Facebook ‘f’). If you just drop them into a row, they will look messy.
The Bounding Box Rule
Always download social icons that are centered within a uniform square bounding box (the viewBox), typically 0 0 24 24. This ensures that when you set width: 24px; height: 24px; in CSS, the icons visually align on their center axis, regardless of the internal path shape.
Spacing
Don’t cram icons together. Mobile users need adequate touch targets to avoid accidentally opening LinkedIn when they meant to tap Instagram.
- Ensure at least 16px to 24px of gap between each icon.
- Alternatively, add padding to the
<a>tag so the clickable area is larger than the visual SVG.
Keeping Icons Up to Date
Social media brands rebrand frequently. (The shift from the Twitter Bird to the ‘X’ being the most notable recent example).
Best Practice: Do not download random, user-created PNGs from image search. Always source your SVGs from either:
- The company’s official brand guidelines press page.
- A maintained open-source icon library like Simple Icons (simpleicons.org), which specializes exclusively in keeping thousands of brand logos up to date with exact SVG paths and official hex colors.
Summary
When implementing social icons, leverage SVGs and currentColor to create elegant hover states. Ensure all icons share a uniform viewBox for perfect alignment, provide adequate touch spacing, and rely on specialized libraries like Simple Icons to ensure your logos remain accurate and legally compliant.