© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
C
C#
•
2y ago
•
4 replies
Jay
✅ How can I convert/flatten an 8-Digit Hex color (Alpha) to a 6-Digit Hex color (Assuming white BG)
Does anyone here know how to convert an 8
-Digit HEX color code to a 6
-Digit HEX color code
(Assuming the background color is white
)
?
For instance
#8F8C7E00
#8F8C7E00
should resolve to
#FFFFFF
#FFFFFF
(Because the first hex is completely transparent as the last two digits are
00
00
.
)
I
've attached an image that elaborates
.
Also have a stackoverflow post here that goes into more detail
:
https://stackoverflow.com/questions/78044876/how-can-i-convert-flatten-an-8-digit-hex-color-alpha-to-a-6-digit-hex-color-th
Any help at all would be extremely
, extremely
, appreciated
!
Stack Overflow
How can I convert/flatten an 8-Digit Hex color (Alpha) to a 6-Digit...
I
've googled everywhere and can
't find any resource or page that goes in to how to accomplish this
. Most results just work with rgba
(
) etc
.
What I want exactly
: To convert a 8
-Digit hex with transp
.
.
.
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
✅ Hex color converter breaks on 3-digit and 4-digit values
C
C# / help
2y ago
Cant convert HEX
C
C# / help
4y ago
❔ How to convert a hex string to a Span<byte>?
C
C# / help
3y ago
✅ How can i convert a character to an in?
C
C# / help
3y ago