C
C#5mo ago
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 should resolve to #FFFFFF (Because the first hex is completely transparent as the last two digits are 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...
No description
3 Replies
Buddy
Buddy5mo ago
You have the algorithm right there https://stackoverflow.com/a/78044915
Jay
Jay5mo ago
Yep got it, thanks!
Buddy
Buddy5mo ago
You linked it, lol. Don't thank me
Want results from more Discord servers?
Add your server
More Posts
Azure video analyzer:blue_siren: :blue_siren: Is there any azure service that I can use to analyze a video's content? IBlazor Server and Client app, Azure questionI have Blazor Server and Client app. I deployed it on Azure Web App (not static). When I open the cLoop is returning the completely wrong value.I am using the Linqpad to test a pricing algorithm but the result at the is completely wrong. Instea✅ Invalidating inherited Properties Tree in WPFI'm trying to implement an inherited list property (called `InheritedCustomContextList`) which mergeHow do I pass through JWT token and customer headersNot sure this approach is right. I have a webapi that will receive a bearer token and a custom head✅ Is there a way you can check if an object’s equality operator will compare by reference?I want to implement a data validation attribute like [UniqueValues] for ASP.NET model binding which ✅Need help with streaming ChatGPT response to Blazor AppHi, I have for a couple of days now been through this code without understanding why I can't get stHow to implement Astar algorithm for a 2D topdown game? Tried Unitys navmesh but it bugs out on 2D.Hello! im working on a school project and i need to implement pathfinding for my klick to move proto✅ When I run my code, it returns to the state it was 10 minutes ago.I know there is a bug in code but where how can i debug a asp.netBest way to model different options in EF CoreI have a class that's used to define the integration parameters for a particular process. Now, I hav